TypeScript tries to make sure the variables are always populated with data of the type specified during the variable definition. Issue When the TypeScript compiler thinks a function can return another data type, or “unknown”, “undefined”, “null”, Visual Studio Code displays a warning: type ‘unknown’ is not assignable to type … Solution The solution is …
Continue reading “Type ‘unknown’ is not assignable to type …”