2 ms·
Aside from type annotations, TS only has one superset feature (decorators). It's already behind a flag.
by simplify 8y ago
Aside from type annotations, TS only has one superset feature (decorators). It's already behind a flag.
- sverrejoh 8y agoand namespaces and enums at least.
- simplify 8y agoThanks, I had forgotten about those.
- WorldMaker 8y agoNamespaces are considered a deprecated artifact from TS < 1 and most projects suggest turning on lint errors for using them. Even if you do them, they are simple syntax sugar for an IIFE pattern that has been common in JS since forever. Enums are simple syntax sugar for constants patterns you could write by hand easily. Other than decorators and JSX-related stuff (also behind compiler flags), TS has been pretty strict about keeping only to Stage 3+ ES proposals since 1.x. Decorators got a strong push from Angular-based teams and JSX gets a lot of attention from React-based teams, so its also not like TS is adding stuff "just because", they are doing it for real world project engineering needs.