@tsed/core
Advanced tools
Comparing version 4.5.0 to 4.5.1
@@ -249,3 +249,8 @@ "use strict"; | ||
static has(key, target, propertyKey) { | ||
return Reflect.hasMetadata(key, utils_1.getClass(target), propertyKey); | ||
try { | ||
return Reflect.hasMetadata(key, utils_1.getClass(target), propertyKey); | ||
} | ||
catch (er) { | ||
} | ||
return false; | ||
} | ||
@@ -252,0 +257,0 @@ /** |
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
export declare const getContructor: (targetClass: any) => Function; | ||
export declare const getConstructor: (targetClass: any) => Function; | ||
/** | ||
@@ -13,0 +13,0 @@ * Get the provide constructor if target is an instance. |
@@ -11,3 +11,3 @@ "use strict"; | ||
*/ | ||
exports.getContructor = (targetClass) => typeof targetClass === "function" | ||
exports.getConstructor = (targetClass) => typeof targetClass === "function" | ||
? targetClass | ||
@@ -14,0 +14,0 @@ : targetClass.constructor; |
{ | ||
"name": "@tsed/core", | ||
"version": "4.5.0", | ||
"version": "4.5.1", | ||
"description": "Core module for Ts.ED Framework", | ||
@@ -55,3 +55,3 @@ "main": "./lib/index.js", | ||
"license": "MIT", | ||
"gitHead": "5b506f7996f6169099b1e822b58930d8aa5c5e6a" | ||
"gitHead": "653cf578f3821b427047c54a74cab4b5606a126e" | ||
} |
@@ -254,3 +254,7 @@ /** | ||
static has(key: string, target: any, propertyKey?: string | symbol): boolean { | ||
return Reflect.hasMetadata(key, getClass(target), propertyKey!); | ||
try { | ||
return Reflect.hasMetadata(key, getClass(target), propertyKey!); | ||
} catch (er) { | ||
} | ||
return false; | ||
} | ||
@@ -257,0 +261,0 @@ |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
export const getContructor = (targetClass: any): Function => | ||
export const getConstructor = (targetClass: any): Function => | ||
typeof targetClass === "function" | ||
@@ -15,0 +15,0 @@ ? targetClass |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
298867
6055