refactor(frontend): use Symbol for vue provide/inject
This commit is contained in:
12
packages/frontend/src/di.ts
Normal file
12
packages/frontend/src/di.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import type { InjectionKey, Ref } from 'vue';
|
||||
import type { IRouter } from '@/nirax.js';
|
||||
|
||||
export const DI = {
|
||||
routerCurrentDepth: Symbol() as InjectionKey<number>,
|
||||
router: Symbol() as InjectionKey<IRouter>,
|
||||
};
|
Reference in New Issue
Block a user