IObjectStore.ts
1 export const IObjectStoreSymbol = Symbol.for('IObjectStore'); 2 3 /** 4 * A service to store an retrieve objects. 5 */ 6 export interface IObjectStore { 7 /** 8 * Saves a value with specified key to the store. 9 * @param key key of the value to set. 10 * @param value value to set. 11 */ 12 set<T>(key: string, value: T): void; 13 14 /** 15 * Retrieves a value by the specified key from the store. 16 * @param key key of the value to retrieve. 17 */ 18 get<T>(key: string): T | undefined; 19 }