Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder if there's a guide of recommendations about typescript now deprecated features, and its modern equivalents.


Given Typescript has preferred opt-in strictness flags for its recommendations, the two big places that seem to be Typescript's best documentation of "deprecated" features seems to be:

1) verbatimModuleSyntax -- https://www.typescriptlang.org/tsconfig/#verbatimModuleSynta...

2) isolatedModules -- https://www.typescriptlang.org/tsconfig/#isolatedModules

Between the two of those flags, enums and namespaces and a few other things get disabled.

The flag documentation doesn't explain what the modern equivalents are, though. I suppose that's currently left to blog posts like the one linked here.


isolatedModules doesn't disable enums in general, only exported const enums (which are arguably the most useful form of enums).


Yeah they should deprecate namespaces and enums in the next major version... oh wait...

TypeScript versioning is literally a joke


What are you implying with "oh wait"? They have major versions every once in a while, and breaking changes. They could do that.


They are not doing Semver. They are just counting two number, e.g. after 4.9 there is 5.0. Afaik, every version can contain breaking changing.


Does that mean I'm supposed to interpret "... oh wait..." as "it would be very easy for them to deprecate a feature because they have lots of sufficiently major releases"? Because it comes across as implying they wouldn't be able to do it.

I really don't understand what GP's point was.


I'm not trying to be cheeky here. They have literally joked about how TypeScript versions means nothing really. So they can't just announce a new major version and drop enums completely. Maybe with a feature flag this is possible but even then, a fresh tsc --init not supporting enums is not really how TypeScript works


But they do break things and drop things. I don't see why they can't do that. I think they simply don't want to remove it very badly.


It's js devs, what do you expect




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: