UNPKG

@use-services/dynconf

Version:
16 lines (15 loc) 596 B
import { ServiceOption, InitOption } from "use-services"; import { Service as IORedisService } from "@use-services/ioredis"; export declare type Option<A, S extends Service<A>> = ServiceOption<A, S>; export declare type Deps = [IORedisService]; export declare class Service<A> { private data; private redis; private modifyAt; private dateKey; private dataKey; constructor(option: InitOption<A, Service<A>>); save(change: Partial<A>): Promise<void>; load(): Promise<A>; } export declare function init<A, S extends Service<A>>(option: InitOption<A, S>): Promise<S>;