mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #1675 from NativeScript/hdeshev/decorator-param
Add the global __params helper.
This commit is contained in:
@ -127,6 +127,12 @@ if (typeof global.__metadata !== "function") {
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof global.__param !== "function") {
|
||||
global.__param = (global && global.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
}
|
||||
|
||||
export function Deprecated(target: Object, key?: string | symbol, descriptor?: any) {
|
||||
if (descriptor) {
|
||||
var originalMethod = descriptor.value;
|
||||
@ -163,4 +169,4 @@ export function Experimental(target: Object, key?: string | symbol, descriptor?:
|
||||
}
|
||||
}
|
||||
|
||||
global.Experimental = Experimental;
|
||||
global.Experimental = Experimental;
|
||||
|
Reference in New Issue
Block a user