tsbase
Version:
Base class libraries for TypeScript
14 lines (13 loc) • 541 B
TypeScript
import { Result } from '../../Patterns/Result/Result';
import { IGenericStorage } from './IGenericStorage';
/**
* Provides a generic interface for storing values in an in-memory Map object
*/
export declare class InMemoryStorage implements IGenericStorage {
private storageMap;
Get<T>(_type: new () => T, key: string): Result<T | null>;
Set<T>(key: string, value: T): Result<null>;
GetValue<T>(key: string): Result<T | null>;
SetValue(key: string, value: string): Result<null>;
Remove(key: string): Result<null>;
}