-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove ts-strict-ignore for env files and add typing #2683
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ export interface Environment { | |
readonly docsUrlPrefix: string; | ||
readonly links: { | ||
|
||
readonly COMMON_STORAGE: string, | ||
readonly COMMON_STORAGE: string | null, | ||
readonly FORGET_PASSWORD: string, | ||
readonly EVCS_KEBA_KECONTACT: string, | ||
readonly EVCS_HARDY_BARTH: string, | ||
|
@@ -41,8 +41,9 @@ export interface Environment { | |
readonly CONTROLLER_API_REST_READ: string, | ||
readonly CONTROLLER_API_REST_READWRITE: string, | ||
|
||
readonly SETTINGS_ALERTING: string, | ||
readonly SETTINGS_NETWORK_CONFIGURATION: string, | ||
readonly SETTINGS_ALERTING: string | null, | ||
readonly SETTINGS_NETWORK_CONFIGURATION: string | null, | ||
readonly EVCS_CLUSTER: string, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is this attribute on theme.ts. but in this file this attribute is missing. so I added it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great 👍 |
||
|
||
readonly WARRANTY: { | ||
readonly HOME: { | ||
|
@@ -89,5 +90,5 @@ export interface Environment { | |
APP_IMAGE: (language: string, appId: string) => string | null; | ||
}, | ||
}, | ||
readonly PRODUCT_TYPES: (translate: TranslateService) => Filter | ||
readonly PRODUCT_TYPES: (translate: TranslateService) => Filter | null | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// @ts-strict-ignore | ||
import { Environment } from "src/environments"; | ||
import { theme } from "./theme"; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
// @ts-strict-ignore | ||
import { Environment } from "src/environments"; | ||
import { theme } from "./theme"; | ||
|
||
// In docker test environment variable window.env is injected. | ||
// cf. | ||
// - tools/docker/ui/root/etc/s6-overlay/s6-rc.d/init-nginx/run | ||
// - tools/docker/ui/assets/env.template.js | ||
const window_env = (window as any).env as { [key: string]: string}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. window is exsiting variable, but window.env is added by project dependent code. typing is needed. |
||
|
||
export const environment: Environment = { | ||
...theme, ...{ | ||
|
||
backend: 'OpenEMS Backend', | ||
url: window["env"]["websocket"], | ||
url: window_env.websocket, | ||
|
||
production: true, | ||
debugMode: false, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// @ts-strict-ignore | ||
import { Environment } from "src/environments"; | ||
import { theme } from "./theme"; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// @ts-strict-ignore | ||
import { Environment } from "src/environments"; | ||
import { theme } from "./theme"; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// @ts-strict-ignore | ||
import { Environment } from "src/environments"; | ||
import { theme } from "./theme"; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// @ts-strict-ignore | ||
import { Environment } from "src/environments"; | ||
import { theme } from "./theme"; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default value is null, so I added null.