re: JavaScript Modules VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I agree with @nektro , the standard is ES6 modules, it's just that some haven't caught up with it yet. Due also to the inane amount of tooling that...

Currently typescript gives me all the future features and rollup handles the bundling. It's working out better than I expected.

I'm talking about these features, like the pipeline operator.

Are they in TypeScript?

Class properties, decorators, default exports/re-exports, namespaces, numeric separators, and a few more are all there.

TypeScript has a few things that are actually not in that list like boilerplate constructors for declaring instance variables and null removal without if checking, e.g.

class A {
  constructor(readonly i?: SomeType) { }
}
const iValue = (new A(123)).i!;

If the pipeline makes it to the standard then it will show up in TypeScript but it is consistently ahead of the standard so I usually get all the nice features before they even end up in the standard.

code of conduct - report abuse