Add the global __params helper. Used by decorated constructor parameters.

This commit is contained in:
Hristo Deshev
2016-03-01 11:36:32 +02:00
parent 3ce5df039b
commit ce5b195aba

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;