import { Component } from "@angular/core" ; import { EventData , Switch } from "@nativescript/core" ; @ Component ( { moduleId : module . id , templateUrl : "./usage.component.html" } ) export class BasicSwitchComponent { onCheckedChange ( args ) { let sw = args . object as Switch ; let isChecked = sw . checked ; } }