(callback: (scope: Scope) => T)
| 40 | } |
| 41 | |
| 42 | function withScope<T>(callback: (scope: Scope) => T): T { |
| 43 | const scope = getScopes().scope.clone(); |
| 44 | const isolationScope = getScopes().isolationScope; |
| 45 | return asyncStorage.run({ scope, isolationScope }, () => { |
| 46 | return callback(scope); |
| 47 | }); |
| 48 | } |
| 49 | |
| 50 | function withSetScope<T>(scope: Scope, callback: (scope: Scope) => T): T { |
| 51 | const isolationScope = getScopes().isolationScope.clone(); |
no test coverage detected