| Are you serious right now??? Like... Half the original point of TS was to add features to JS that weren't there originally. Granted, as the base language evolved the gap has become smaller, but it's still there. Interfaces being one such example. There's also things you can do in JS that TS will bitch about. For example, try using object destructuring in a class constructor to create optional named parameters for a class. Works perfectly in Vanilla JS, but TS will throw a hissy-fit. |
What?
You mean like this?
https://www.typescriptlang.org/play?#code/MYGwhgzhAEBiD29oG8...