1.1.4 • Published 6 months ago

@types/env-to-object v1.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/env-to-object

Summary

This package contains type definitions for env-to-object (https://github.com/kgryte/node-env-to-object#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/env-to-object.

index.d.ts

// Type definitions for env-to-object 1.1
// Project: https://github.com/kgryte/node-env-to-object#readme
// Definitions by: TANAKA Koichi <https://github.com/MugeSo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace env {
    interface Mappings {
        [enviromentVariableName: string]: Mapping;
    }

    type Mapping = IntegerMapping | BooleanMapping | GenericMapping;

    interface GenericMapping {
        keypath: string;
        type?: string | undefined;
        [opt: string]: any;
    }

    interface IntegerMapping extends GenericMapping {
        type: "integer";
        radix: number;
    }

    interface BooleanMapping {
        type: "boolean";
        strict: boolean;
    }

    interface Parsers {
        [parserName: string]: (str: string, opts: any) => any;
    }

    interface Options {
        parsers: Parsers;
    }
}

declare function env(map: env.Mappings, options?: env.Options): any;
export = env;

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:01:09 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by TANAKA Koichi.