@deepkit/core
Advanced tools
Comparing version 1.0.0-alpha.12 to 1.0.0-alpha.13
@@ -98,3 +98,3 @@ "use strict"; | ||
this.suite.on('complete', () => { | ||
resolve(); | ||
resolve(undefined); | ||
}); | ||
@@ -101,0 +101,0 @@ }); |
@@ -6,2 +6,3 @@ export declare class CompilerContext { | ||
build(functionCode: string, ...args: string[]): Function; | ||
buildAsync(functionCode: string, ...args: string[]): Function; | ||
} |
@@ -36,4 +36,12 @@ "use strict"; | ||
} | ||
buildAsync(functionCode, ...args) { | ||
functionCode = ` | ||
return async function(${args.join(', ')}){ | ||
${functionCode} | ||
}; | ||
`; | ||
return new Function(...this.context.keys(), functionCode)(...this.context.values()); | ||
} | ||
} | ||
exports.CompilerContext = CompilerContext; | ||
//# sourceMappingURL=compiler.js.map |
@@ -166,3 +166,3 @@ "use strict"; | ||
function isArray(obj) { | ||
return (obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
return !!(obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
} | ||
@@ -169,0 +169,0 @@ exports.isArray = isArray; |
@@ -52,6 +52,6 @@ "use strict"; | ||
try { | ||
return await this[name][propertyKey]; | ||
return await this[name]; | ||
} | ||
finally { | ||
this[name][propertyKey] = null; | ||
this[name] = null; | ||
} | ||
@@ -58,0 +58,0 @@ }; |
@@ -81,3 +81,3 @@ "use strict"; | ||
await lock5.unlock(); | ||
resolve(); | ||
resolve(undefined); | ||
}, 1000); | ||
@@ -84,0 +84,0 @@ }, 1000); |
{ | ||
"name": "@deepkit/core", | ||
"version": "1.0.0-alpha.12", | ||
"version": "1.0.0-alpha.13", | ||
"description": "Super Hornet core library", | ||
@@ -35,3 +35,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "7b52eeb51e6b57fb6d9638276e2a225e41e650e7" | ||
"gitHead": "c407212eda73a4aa4f5bc33c16ac660f90e6098d" | ||
} |
@@ -125,3 +125,3 @@ /* | ||
this.suite.on('complete', () => { | ||
resolve(); | ||
resolve(undefined); | ||
}); | ||
@@ -128,0 +128,0 @@ }); |
@@ -36,2 +36,11 @@ /* | ||
} | ||
buildAsync(functionCode: string, ...args: string[]): Function { | ||
functionCode = ` | ||
return async function(${args.join(', ')}){ | ||
${functionCode} | ||
}; | ||
`; | ||
return new Function(...this.context.keys(), functionCode)(...this.context.values()); | ||
} | ||
} |
@@ -158,3 +158,3 @@ /* | ||
export function isArray(obj: any): obj is any[] { | ||
return (obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
return !!(obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
} | ||
@@ -161,0 +161,0 @@ |
@@ -57,5 +57,5 @@ /* | ||
try { | ||
return await (this as any)[name][propertyKey]; | ||
return await (this as any)[name]; | ||
} finally { | ||
(this as any)[name][propertyKey] = null; | ||
(this as any)[name] = null; | ||
} | ||
@@ -62,0 +62,0 @@ }; |
@@ -101,3 +101,3 @@ import 'jest-extended'; | ||
await lock5.unlock(); | ||
resolve(); | ||
resolve(undefined); | ||
}, 1000); | ||
@@ -104,0 +104,0 @@ }, 1000); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
523477
4386