Skip to content

Fail to import classPrivateFieldGet from tslib when "importHelpers": true #36841

Closed
@millsp

Description

@millsp

I am testing out the lastest ECMA private fields. I get an error when importHelpers enabled:

This syntax requires an imported helper named '__classPrivateFieldGet' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'.ts(2343)

I'm not sure if there's pending work on the tslib, so I'm repoting this anyway.

TypeScript Version: 3.8.1-rc
TS Lib Version: 1.1.0

Search Terms:
tslib classPrivateFieldGet

Code

class A {
    #a: number

    constructor() {
        this.#a = 1
    }
}

Expected behavior:

This should compile

Actual behavior:

Shows an error on tslib

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

Fix AvailableA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.RescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions