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

2.1.3 • Public • Published

Installation

npm install --save @types/properties-reader

Summary

This package contains type definitions for properties-reader (https://github.com/steveukx/properties).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/properties-reader.

index.d.ts

declare namespace PropertiesReader {
    type Value = string | number | boolean;

    interface Reader {
        get(propertyName: string): Value | null;
        getRaw(propertyName: string): string | null;
        path(): {};
        append(path: string): Reader;
        read(properties: string): Reader;
        set(propertyName: string, value: Value): Reader;
        length: number;
        each(iterator: (key: string, value: Value) => void): Reader;
        each<T>(iterator: (this: T, key: string, value: Value) => void, scope: T): Reader;
        getAllProperties(): { [key: string]: Value };
        clone(): Reader;
        save(destFile: string, onComplete?: (err: any, data: string) => void): Promise<string>;
        getByRoot(root: any): { [key: string]: Value };
        bindToExpress(app: object, basePath?: string, makePaths?: boolean): Reader;
    }

    interface AppenderOptions {
        allowDuplicateSections: boolean;
    }
    interface WriterOptions {
        saveSections: boolean;
    }

    interface FullOptions {
        appender?: AppenderOptions | undefined;
        writer?: WriterOptions | undefined;
    }
}

declare function PropertiesReader(
    path: string,
    encoding?: string,
    options?: PropertiesReader.AppenderOptions | PropertiesReader.WriterOptions | PropertiesReader.FullOptions,
): PropertiesReader.Reader;

export = PropertiesReader;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Zlatko Andonovski.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/properties-reader

Weekly Downloads

36,941

Version

2.1.3

License

MIT

Unpacked Size

5.4 kB

Total Files

5

Last publish

Collaborators

  • types