mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
14 lines
307 B
TypeScript
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('/');
|
|
}
|