mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Decorators added and Deprecated decorator implemented
This commit is contained in:
16
declarations.d.ts
vendored
16
declarations.d.ts
vendored
@@ -16,7 +16,23 @@ declare var console: Console;
|
||||
declare var global;
|
||||
declare var require;
|
||||
|
||||
interface TypedPropertyDescriptor<T> {
|
||||
enumerable?: boolean;
|
||||
configurable?: boolean;
|
||||
writable?: boolean;
|
||||
value?: T;
|
||||
get?: () => T;
|
||||
set?: (value: T) => void;
|
||||
}
|
||||
|
||||
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
||||
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
||||
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
||||
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
|
||||
|
||||
// Global functions
|
||||
declare function Deprecated(target: Object, key?: string | symbol, value?: any): void;
|
||||
|
||||
declare function Log(data: any): void;
|
||||
declare function log(data: any): void;
|
||||
declare function float(num: number): any;
|
||||
|
||||
Reference in New Issue
Block a user