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

    1.0.33 • Public • Published

    Installation

    npm install --save @types/angular-environment

    Summary

    This package contains type definitions for angular-environment (https://github.com/juanpablob/angular-environment).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-environment.

    index.d.ts

    // Type definitions for angular-environment v1.0.4
    // Project: https://github.com/juanpablob/angular-environment
    // Definitions by: Matt Wheatley <https://github.com/terrawheat>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    declare namespace angular.environment {
      interface ServiceProvider {
        /**
         * Sets the configuration object
         */
        config: (config: angular.environment.Config) => void;
        /**
         * Evaluates the current domain and
         * loads the correct environment variables.
         */
        check: () => void;
        /**
         * Retrieves the correct version of a
         * variable for the current environment.
         */
        read: (key: string) => any;    
      }
      interface Service {
        /**
         * Retrieve the current environment
         */
        get: () => string,
    
        /**
         * Force sets the current environment
         */
        set: (environment: string) => void,
    
        /**
         * Evaluates current environment against
         * environment parameter.
         */
        is: (environment: string) => boolean,
    
        /**
         * Retrieves the correct version of a
         * variable for the current environment.
         */
        read: (key: string) => any;
      }
    
      interface Config {
        /**
         * Map of domains to their environments
         */
        domains: { [environment: string]: Array<string> },
        /**
         * List of variables split by environment
         */
        vars: { [environment: string]: { [variable: string]: any }},
      }
    }

    Additional Details

    • Last updated: Fri, 09 Jul 2021 02:32:20 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by Matt Wheatley.

    Keywords

    none

    Install

    npm i @types/angular-environment

    DownloadsWeekly Downloads

    46

    Version

    1.0.33

    License

    MIT

    Unpacked Size

    5.54 kB

    Total Files

    4

    Last publish

    Collaborators

    • types