()
| 2 | import { persistence } from './registry' |
| 3 | |
| 4 | export function tryGetCurrentAccountScope(): AccountScope | null { |
| 5 | const accountId = persistence.database.getActiveContext().accountId |
| 6 | if (!accountId) { |
| 7 | return null |
| 8 | } |
| 9 | return { accountId } |
| 10 | } |
| 11 | |
| 12 | export function getCurrentAccountScope(): AccountScope { |
| 13 | const scope = tryGetCurrentAccountScope() |
no test coverage detected