4 ms·
> with the exception of `Enum` that emits an object, many of which see as a mistake There are other exceptions, most of which are considered mistakes as well,
by eyelidlessness 3y ago
> with the exception of `Enum` that emits an object, many of which see as a mistake
There are other exceptions, most of which are considered mistakes as well, the most obvious which come to mind being `module` and `namespace` as runtime constructs. But I’m fairly sure these have been primarily used by TypeScript itself for at least a few years, and even they recently migrated away.
Another one that comes to mind is, I believe, actually pretty popular: what they refer to as “parameter properties”, ie class members whose types are defined in a constructor’s parameters. These seem to have escaped controversy because they eliminate a lot of redundant boilerplate, and generally behave in obvious ways (at least as obvious as their redundant boilerplate JS equivalents).