mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
chore: merge blocksuite source code (#9213)
This commit is contained in:
13
blocksuite/framework/global/src/di/scope.ts
Normal file
13
blocksuite/framework/global/src/di/scope.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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('/');
|
||||
}
|
||||
Reference in New Issue
Block a user