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
4
data/observable/observable.d.ts
vendored
4
data/observable/observable.d.ts
vendored
@@ -97,7 +97,7 @@ declare module "data/observable" {
|
||||
* Notifies all the registered listeners for the event provided in the data.eventName.
|
||||
* @param data The data associated with the event.
|
||||
*/
|
||||
notify(data: EventData): void;
|
||||
notify<T extends EventData>(data: T): void;
|
||||
|
||||
/**
|
||||
* Notifies all the registered listeners for the property change event.
|
||||
@@ -119,4 +119,4 @@ declare module "data/observable" {
|
||||
_emit(eventNames: string);
|
||||
//@endprivate
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ export class Observable implements definition.Observable {
|
||||
this[data.propertyName] = data.value;
|
||||
}
|
||||
|
||||
public notify(data: definition.EventData) {
|
||||
public notify<T extends definition.EventData>(data: T) {
|
||||
var observers = this._getEventList(data.eventName);
|
||||
if (!observers) {
|
||||
return;
|
||||
@@ -206,4 +206,4 @@ export class Observable implements definition.Observable {
|
||||
public toString(): string {
|
||||
return this.typeName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user