mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix typescript 1.6 compile errors.
- Remove unknown properties in object literals. - Don't use module-level `delete` statements.
This commit is contained in:
committed by
Vladimir Enchev
parent
ccbd00dac8
commit
13deafec79
@@ -16,6 +16,10 @@ function onCheckedPropertyChanged(data: dependencyObservable.PropertyChangeData)
|
||||
|
||||
global.moduleMerge(common, exports);
|
||||
|
||||
interface Owned {
|
||||
owner: any;
|
||||
}
|
||||
|
||||
export class Switch extends common.Switch {
|
||||
private _android: android.widget.Switch;
|
||||
|
||||
@@ -28,7 +32,7 @@ export class Switch extends common.Switch {
|
||||
|
||||
var that = new WeakRef(this);
|
||||
|
||||
this._android.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener({
|
||||
this._android.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener(<Owned & android.widget.CompoundButton.IOnCheckedChangeListener>{
|
||||
get owner() {
|
||||
return that.get();
|
||||
},
|
||||
@@ -40,4 +44,4 @@ export class Switch extends common.Switch {
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user