mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Merge pull request #1572 from NativeScript/vladimirov/add-metadata-decorator
Add global __metadata function
This commit is contained in:
@ -119,6 +119,14 @@ if (typeof global.__decorate !== "function") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof global.__metadata !== "function") {
|
||||||
|
global.__metadata = function (k, v) {
|
||||||
|
if (typeof global.Reflect === "object" && typeof global.Reflect.metadata === "function") {
|
||||||
|
return global.Reflect.metadata(k, v);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function Deprecated(target: Object, key?: string | symbol, descriptor?: any) {
|
export function Deprecated(target: Object, key?: string | symbol, descriptor?: any) {
|
||||||
if (descriptor) {
|
if (descriptor) {
|
||||||
var originalMethod = descriptor.value;
|
var originalMethod = descriptor.value;
|
||||||
|
Reference in New Issue
Block a user