4 ms·
Writing assertions has a runtime cost that isn't present when using something like TypeScript. Granted, that benefit is probably minor, but it is a benefit in
by Bahamut 10y ago
Writing assertions has a runtime cost that isn't present when using something like TypeScript.
Granted, that benefit is probably minor, but it is a benefit in TypeScript's favor.
- mbrock 10y agoIt does have a compile time cost and that's not negligible... although with all the heavy transpilation going on these days, a bit of type checking might drown that out. At a previous job we tried TypeScript but it took around 20 seconds to build our front end. Since then I hear speed has improved.