Merge pull request #1675 from NativeScript/hdeshev/decorator-param

Add the global __params helper.
This commit is contained in:
Hristo Deshev
2016-03-01 17:26:52 +02:00

View File

@ -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;