UNPKG

micro-message

Version:

global data store of micro front-end / multi app

19 lines (18 loc) 1.13 kB
export type BridgeStore = Record<string, any>; export declare const getStore: () => BridgeStore; export declare const getStoreForPublic: () => BridgeStore; export declare const getStoreValue: <T extends unknown = any>(key: string) => T; export declare const setStoreValue: (key: string, value: any) => void; export declare const setStoreScopeValue: (key: string, value: any, scope: string) => void; export declare const getStoreScopeValue: <T extends unknown = any>(key: string, scope: string) => T; export declare const getStoreScopeObj: <T extends Record<string, any> = {}>(scope: string) => T; export declare const setStoreScopeObj: (value: any, scope: string) => void; export declare const Store: { getStore: () => BridgeStore; get: <T extends unknown = any>(key: string) => T; set: (key: string, value: any) => void; getWithScope: <T_1 extends unknown = any>(key: string, scope: string) => T_1; setWithScope: (key: string, value: any, scope: string) => void; getScope: <T_2 extends Record<string, any> = {}>(scope: string) => T_2; setScope: (value: any, scope: string) => void; };