@furystack/utils
Advanced tools
Comparing version 1.2.7 to 1.2.8
@@ -42,3 +42,3 @@ /** | ||
*/ | ||
export declare const using: <T extends Disposable, TReturns>(resource: T, callback: (resource: T) => TReturns) => TReturns; | ||
export declare const using: <T extends Disposable, TReturns>(resource: T, callback: (r: T) => TReturns) => TReturns; | ||
/** | ||
@@ -52,3 +52,3 @@ * Method that accepts an IDisposable resource that will be disposed after the callback | ||
*/ | ||
export declare const usingAsync: <T extends Disposable, TReturns>(resource: T, callback: (resource: T) => Promise<TReturns>) => Promise<TReturns>; | ||
export declare const usingAsync: <T extends Disposable, TReturns>(resource: T, callback: (r: T) => Promise<TReturns>) => Promise<TReturns>; | ||
//# sourceMappingURL=disposable.d.ts.map |
{ | ||
"name": "@furystack/utils", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"description": "General utilities", | ||
@@ -37,5 +37,5 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^26.0.10" | ||
"@types/jest": "^26.0.12" | ||
}, | ||
"gitHead": "9614fceb36efa35712aa8d965c470045039342c8" | ||
"gitHead": "92618e51d263f9994328a437a3f41cfa2e804689" | ||
} |
@@ -44,3 +44,3 @@ /** | ||
*/ | ||
export const using = <T extends Disposable, TReturns>(resource: T, callback: (resource: T) => TReturns) => { | ||
export const using = <T extends Disposable, TReturns>(resource: T, callback: (r: T) => TReturns) => { | ||
try { | ||
@@ -63,3 +63,3 @@ return callback(resource) | ||
resource: T, | ||
callback: (resource: T) => Promise<TReturns>, | ||
callback: (r: T) => Promise<TReturns>, | ||
) => { | ||
@@ -66,0 +66,0 @@ try { |
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
201585