Skip to content

Commit a8dfd04

Browse files
committed
[TSTEMPLATE-17] Environment file should merge declaration and definitions
1 parent 400bc15 commit a8dfd04

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [v1.2.4]
44

55
### Fixes
6+
- [TSTEMPLATE-17] Environment file should merge declaration and definitions
67
- [TSTEMPLATE-16] Build should clear dist
78
- [TSTEMPLATE-15] Set no-empty eslint rule to warn instead of error
89
- [TSTEMPLATE-14] Remove tsconfig.spec.json

src/environment.ts

+6-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ const envfile = dotenv.config();
44
/**
55
* Environment Variables Schema
66
*/
7-
export interface Environment {
8-
APP_TITLE: string
7+
export class Environment {
8+
APP_TITLE = 'MY_APP';
99
}
1010

11-
/**
12-
* Default Values
13-
*/
14-
const defaults: Environment = {
15-
APP_TITLE: 'MY_APP'
16-
};
17-
1811
// Export
19-
export const env: Environment = Object.assign(defaults, envfile.parsed);
12+
export const env: Environment = Object.assign(
13+
new Environment(),
14+
envfile.parsed
15+
);

0 commit comments

Comments
 (0)