Files
AFFiNE-Mirror/blocksuite/framework/global/src/di/scope.ts
2024-12-20 15:38:06 +08:00

14 lines
307 B
TypeScript

import { ROOT_SCOPE } from './consts.js';
import type { ServiceScope } from './types.js';
export function createScope(
name: string,
base: ServiceScope = ROOT_SCOPE
): ServiceScope {
return [...base, name];
}
export function stringifyScope(scope: ServiceScope): string {
return scope.join('/');
}