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

1.0.37 • 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

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]: string[] };
        /**
         * List of variables split by environment
         */
        vars: { [environment: string]: { [variable: string]: any } };
    }
}

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:23 GMT
  • Dependencies: none

Credits

These definitions were written by Matt Wheatley.

Dependents (1)

Package Sidebar

Install

npm i @types/angular-environment

Weekly Downloads

38

Version

1.0.37

License

MIT

Unpacked Size

5.35 kB

Total Files

5

Last publish

Collaborators

  • types