Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeScript 3.8 Syntax Support #1436

Closed
Closed
Labels
ASTPRs and Issues about the AST structureNew TypeScript VersiondependenciesIssue about dependencies of the packagepackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree
Milestone
@armano2

Description

@armano2

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)

AST:estree/estree#222

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structureNew TypeScript VersiondependenciesIssue about dependencies of the packagepackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp