UNPKG

nestjs-transaction

Version:

A library that extracts and provides only some of the functions of the 'typeorm-transactional' npm module that are needed to operate in the Nestjs + TypeORM environment

16 lines (15 loc) 478 B
export type Store = Map<string, any>; export interface Storage { get<T>(key: string): T | undefined; set(key: string, value: any): void; run<T>(cb: () => Promise<T>): Promise<T>; } export declare class ALSStroage implements Storage { private storage; constructor(); private get store(); get<T>(key: string): T | undefined; set(key: string, value: any): void; run<T>(cb: () => Promise<T>): Promise<T>; } export declare const storage: Storage;