Cast JavaScipt object to TypeScript classes
Published at February 26, 2019 · 2 min read
TypeScript could give you a false hope that I’ve got a strong-typed code and everything will work as expected with JavaScript. In reality, TypeScript doesn’t do anything after sources are compiled to JavaScript. It means, in runtime, you’ll face good-known JavaScript with it dynamic typing. The lack of any runtime type checking is a big minus for TypeScript. You’ll lose all your type at the same moment when browser executes code....