TypeScript’s string enums – “Type … is not assignable to type …”

This is because typescript version.

Open command prompt or terminal. then run these commands.

Check TypeScript version

tsc -v

should be higher than 2.4

if not.

install latest version of typescript globally

npm install typescript -g

Open your package.json file of the project
and change typescript version like this with newly installed version

"typescript": "~2.6.1"

Then delete node_modules folder

Clean cache using

npm cache clean

Finally run

npm install

*Note that: You can update npm using npm update but it is not sure that the typescript version will be updated *

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)