Skip to content

ECMAScript Private fields not implemented in 3.7? #33925

@chimericdream

Description

@chimericdream

According to the release notes and iteration plan, the private fields proposal for ECMAScript is supposed to be part of 3.7, but #30829 doesn't appear to be merged yet, and the actual syntax still causes an error. Is it still planned for the 3.7 release, or will it come later with a 3.7 patch (or 3.8)?

TypeScript Version: 3.7.0-beta

Search Terms: private fields, ecma private

Code

class FooBar {
    #fizz: string = '';
    private buzz: string = '';
}

Expected behavior: This should be valid syntax in 3.7.0-beta, according to the release notes and issue tracker.

Actual behavior: This does not appear to be valid syntax in the beta.

Playground Link: https://www.typescriptlang.org/play/index.html?ts=3.7-Beta&ssl=1&ssc=1&pln=4&pc=2#code/MYGwhgzhAEBiD28BCYBO0DeAoavoGIAzASwC9SAuaCAF1WIDsBzaAXmgHIOBuHPAB3oA3MDQCm0AEYBXclVr1mbTjywBfIA

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions