DEV Community

loading...

Discussion on: Converting a JavaScript project to Typescript, one file at a time

Collapse
suhas_chatekar profile image
Suhas Chatekar Author

Are you able to provide complete code of utility.ts?

Collapse
vyemialyanchyk profile image
vyemialyanchyk

not a big sense here, ENVIRONMENT_CONFIG used in several files, so errors in several places, this is example:

if (ENVIRONMENT_CONFIG.FLAG_1 === '0') {
...
} else if (ENVIRONMENT_CONFIG.FLAG_1 === '1') {
...
} else {
...
}

I've found workable solution: stackoverflow.com/questions/460086...
but I do not like "typings" folder use, cause "typings" expected to be vanished with typings lib use, imo.