You write your typescript code to expect a given type but at the end of the day it’s JavaScript with a type checking compiler so when “'any” gets in through a library or interface somewhere you just get a random “undefined” somewhere when you try to perform an operation with it because it’s just JavaScript at the end of the day
- 0 Posts
- 5 Comments
Joined 2 years ago
Cake day: September 20th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
JavaScript introduces it, if it uses typescript code you lose all type safety
your
I wouldn’t make a typescript repo. But every single one I’ve had to work on has had the same problem
Typescript literally doesn’t work though, every large system has some JavaScript interface somewhere and the “any” type propagates through the system because there’s no type safety at runtime
Fuck them both to death


No the problem is that there’s literally nothing at runtime stopping JavaScript inserting any type it wants into your function that only takes an int for example