@types/confit
TypeScript icon, indicating that this package has built-in type declarations

2.0.6 • Public • Published

Installation

npm install --save @types/confit

Summary

This package contains type definitions for confit (https://github.com/krakenjs/confit).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/confit.

index.d.ts

declare module "confit" {
    interface ProtocolsSetPrivate {
        [protocol: string]: (value: any, callback?: any) => void;
    }

    interface ConfigStore {
        get(name: string): any;
        set<T>(name: string, newValue: T): T;
        use(newSettings: Object): void;
    }

    type options = {
        basedir: string;
        protocols: ProtocolsSetPrivate;
    };

    interface ConfigFactory {
        create(callback: (err: any, config: ConfigStore) => any): void;
        addOverride(filepathOrSettingsObj: string | Object): this;
        addDefault(filepathOrSettingsObj: string | Object): this;
    }

    function confit(optionsOrBaseDir: options | string): ConfigFactory;

    namespace confit {
        export interface ProtocolsSet extends ProtocolsSetPrivate {}
    }

    export = confit;
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Ethan Resnick.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/confit

Weekly Downloads

1,327

Version

2.0.6

License

MIT

Unpacked Size

4.16 kB

Total Files

5

Last publish

Collaborators

  • types