Skip to content

Commit ccfa1a3

Browse files
committed
Merge pull request NativeScript#1675 from NativeScript/hdeshev/decorator-param
Add the global __params helper.
2 parents 62940bf + ce5b195 commit ccfa1a3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

globals/globals.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ if (typeof global.__metadata !== "function") {
127127
};
128128
}
129129

130+
if (typeof global.__param !== "function") {
131+
global.__param = (global && global.__param) || function (paramIndex, decorator) {
132+
return function (target, key) { decorator(target, key, paramIndex); }
133+
};
134+
}
135+
130136
export function Deprecated(target: Object, key?: string | symbol, descriptor?: any) {
131137
if (descriptor) {
132138
var originalMethod = descriptor.value;
@@ -163,4 +169,4 @@ export function Experimental(target: Object, key?: string | symbol, descriptor?:
163169
}
164170
}
165171

166-
global.Experimental = Experimental;
172+
global.Experimental = Experimental;

0 commit comments

Comments
 (0)