bixi
Version:
企业级中后台前端解决方案
18 lines (13 loc) • 508 B
text/typescript
import { InjectionToken } from '@angular/core';
import { ITokenModel } from '../token/interface';
import { BIXI_STORE_TOKEN_LOCAL_FACTORY } from './local-storage.service';
export const BIXI_STORE_TOKEN = new InjectionToken<IStore>('AUTH_STORE_TOKEN', {
providedIn: 'root',
factory: BIXI_STORE_TOKEN_LOCAL_FACTORY
});
// tslint:disable-next-line: interface-name
export interface IStore {
get(key: string): ITokenModel;
set(key: string, value: ITokenModel): boolean;
remove(key: string): void;
}