mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00: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('/');
|
|
}
|