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.