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:
@@ -2,6 +2,10 @@
|
||||
|
||||
global.moduleMerge(common, exports);
|
||||
|
||||
interface Owned {
|
||||
owner: any;
|
||||
}
|
||||
|
||||
export class Button extends common.Button {
|
||||
private _android: android.widget.Button;
|
||||
private _isPressed: boolean;
|
||||
@@ -22,7 +26,8 @@ export class Button extends common.Button {
|
||||
|
||||
this._android = new android.widget.Button(this._context);
|
||||
|
||||
this._android.setOnClickListener(new android.view.View.OnClickListener({
|
||||
this._android.setOnClickListener(new android.view.View.OnClickListener(
|
||||
<Owned & android.view.View.IOnClickListener>{
|
||||
get owner() {
|
||||
return that.get();
|
||||
},
|
||||
@@ -34,4 +39,4 @@ export class Button extends common.Button {
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user