UNPKG

@n1k1t/mock-server

Version:

The ultimate toolkit to intercept, transform, and simulate HTTP/WS traffic with type-safe expectations

26 lines 1.17 kB
import { IContainerConfiguration } from './types'; import { Container } from './model'; export declare class ContainersStorage<TPayload extends object = object> { protected configuration: { group: string; }; protected entities: Map<string, Container<object>>; protected aliases: Map<string, Container<object>>; constructor(configuration: { group: string; }); get size(): number; entries(): MapIterator<[string, Container]>; values(): MapIterator<Container>; /** Extends this storage with another */ extend(storage: ContainersStorage): this; register<T extends object = TPayload>(predicate: Container<NoInfer<T>> | IContainerConfiguration<NoInfer<T>>): Container<T>; /** Finds or creates the container by provided configuration */ provide<T extends object = TPayload>(configuration: IContainerConfiguration<NoInfer<T>>): Container<T>; find<T extends object = TPayload>(key: string | object): Container<T> | undefined; delete(key: string | object): this; /** Returns a list of expired containers */ expired(): Container[]; clear(): this; } //# sourceMappingURL=storage.d.ts.map