3 ms·
The overhead of safe typescript is only in the parts of your code that interact with untyped code. For those parts the default typescript was actually unsafe.
by ufo 12y ago
The overhead of safe typescript is only in the parts of your code that interact with untyped code. For those parts the default typescript was actually unsafe.
- smrtinsert 12y agoI see. This adds soundness to an entire application ts or non ts.
- ufo 12y agoThe main goal of a sound gradual type system is to make it so that any type errors can be "blamed" on the untyped part of the code. For example, if untyped code calls a safe-typescript function and passes the wrong argument type safe-typescript will check and detect the error right away. On the other hand, traditional typescript would accept the invalid parameter without checking and would eventually throw a "method missing" exception somewhere down the line.