@daryl-software/ts-config-loader
TypeScript icon, indicating that this package has built-in type declarations

2.2.1-alpha.1 • Public • Published

@daryl-software/ts-config-loader

npm version

JSON files loader & watcher

Installation

pnpm i @daryl-software/ts-config-loader

Usage

type DbConfig = { db: { host: string; port: number, password?: string }[] };
const config = new ConfigLoader([`directory/base.json`, `directory/env-override.json`], { verbose: true });
const dbConfig = config.get<DbConfig>('db');
config.addObserver<DbConfig>('db', (all) => {
    // changed
});

Dependents (0)

Package Sidebar

Install

npm i @daryl-software/ts-config-loader

Weekly Downloads

0

Version

2.2.1-alpha.1

License

ISC

Unpacked Size

7.42 kB

Total Files

6

Last publish

Collaborators

  • yannick_veron
  • arsonik