UNPKG

@tsed/config

Version:
18 lines (17 loc) 552 B
import type { ConfigSource, ConfigSourceOnChangeCB } from "../../interfaces/ConfigSource.js"; export interface JsonConfigSourceOptions { /** * The path to the JSON file. */ path: string; /** * The encoding to use when reading the file. * @default "utf8" */ encoding?: BufferEncoding; } export declare class JsonConfigSource implements ConfigSource<JsonConfigSourceOptions> { options: JsonConfigSourceOptions; getAll(): Record<string, unknown>; watch(onChange: ConfigSourceOnChangeCB): () => void; }