Interface: Environment
@kosko/env.Environment
Hierarchy
Pick
<ReducerList
,"setReducers"
|"resetReducers"
>↳
Environment
Properties
cwd
• cwd: string
Current working directory.
Default values:
- Node.js:
process.cwd()
- Browser:
/
Defined in
packages/env/src/environment/types.ts:37
env
• Optional
env: string
| string
[]
Current environment.
Defined in
packages/env/src/environment/types.ts:42
extensions
• extensions: string
[]
File extensions of environments.
Defined in
packages/env/src/environment/types.ts:52
paths
• paths: Paths
Paths of environment files.
Defined in
packages/env/src/environment/types.ts:47
Methods
component
▸ component(name
): any
Returns component variables merged with global variables.
Parameters
Name | Type | Description |
---|---|---|
name | string | Component name |
Returns
any
Defined in
packages/env/src/environment/types.ts:64
global
▸ global(): any
Returns global variables.
Returns
any
Defined in
packages/env/src/environment/types.ts:57
resetReducers
▸ resetReducers(): void
Resets reducers to the defaults.
Returns
void
Inherited from
Pick.resetReducers
Defined in
packages/env/src/environment/types.ts:20
setReducers
▸ setReducers(callback
): void
Sets list of reducers using the specified callback function.
Parameters
Name | Type |
---|---|
callback | (reducers : readonly Reducer []) => readonly Reducer [] |
Returns
void
Inherited from
Pick.setReducers