Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
3.8 requires new AST nodes and to support the new syntax.
Type Import (#1697) (SUPPORTED)
importtype{SomeThing}from"./some-module.js";exporttype{SomeThing};
export * as ns
Syntax (#1698) (SUPPORTED)
export*asutilitiesfrom"./utilities.js";
ECMAScript Private Fields (NOT YET SUPPORTED - see#3430)
Important Note
We currently "support" such that no tooling should fail on private fields.
However, the AST that is produced is not considered stable andwill change in futurewithout a major release. Any tooling looking to lint private fields should not rely upon the representation (or be prepared to handle a breakage).
Why don't we have support yet?
In short: we are awaiting agreement on the AST representation from the ESTree spec.
For the 3.7 release we jumped the gun and eagerly implemented optional chaining using babel's AST representation, thinking that the ESTree spec, would just go with that. However ESTree is going with a different and incompatible representation entirely. This will cause our project (and users) a lot of pain as we will have to do amajor, breaking change to the AST to align with what ESLint core will use.
To avoid going through the same pain again with private class fields, we're holding off on official support until ESTree has decided upon a representation.
There are a lot of projects, and a lot of volunteers that collaborate on the ESTree spec, so things take time; please be patient.
classPerson{ #name:stringconstructor(name:string){this.#name=name;}greet(){console.log(`Hello, my name is${this.#name}!`);}}letjeremy=newPerson("Jeremy Bearimy");jeremy.#name
Read more:
https://devblogs.microsoft.com/typescript/announcing-typescript-3-8-beta/