import { Marshaller } from './Marshallers'; import { Parser } from './Parsers'; export interface StorageService { /** Retrieves a string key value and returns it directly */ get(key: string): T; /** Retrieves a non-string key value and transforms it using the given function */ get(key: string, parse: Parser): T; /** Stores a string value directly against a key */ set(key: string, value: T): void; /** Stores a value (to be stringified with the given function) against a key */ set(key: string, value: T, marshal: Marshaller): void; /** Is there a value for the given key? */ contains(key: string): boolean; }