Error ts2322 type 'string' is not assignable to type 'number' In typescript | #VcreationsTech

preview_player
Показать описание
Hello Friends,

Today our topic is on error ts2322 type 'string' is not assignable to type 'number' in typescript.

Basically, this is a error and we encounter such type of errors in our day-to-day programming life.
Let me show you with example,

var num = 8;
//num = "12";

Whenever we assign any type of value in var keyword then automatically the datatype will assign.
But later if we want to change the value then it will show error ts2322 type 'string' is not assignable to type 'number'.
So we shouldn't change the type of value everytime.

Wish You Success,
#VCreationsTech.
Рекомендации по теме
Комментарии
Автор

I found this issue with angular 13 but previous version angular9 it is not an issue.

UDAY
Автор

It didn’t work. Please can you give me another solution

youtubeguy
join shbcf.ru