(callback: (scope: Scope) => T)
| 48 | } |
| 49 | |
| 50 | function withScope<T>(callback: (scope: Scope) => T): T { |
| 51 | const scope = getScopes().scope.clone(); |
| 52 | const isolationScope = getScopes().isolationScope; |
| 53 | return asyncStorage.run({ scope, isolationScope }, () => { |
| 54 | return callback(scope); |
| 55 | }); |
| 56 | } |
| 57 | |
| 58 | function withSetScope<T>(scope: Scope, callback: (scope: Scope) => T): T { |
| 59 | const isolationScope = getScopes().isolationScope.clone(); |
no test coverage detected