Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.3.0 static #private incompatible with importHelpers and tslib 2.1 #43501

Closed
arciisine opened this issue Apr 2, 2021 · 4 comments
Closed

4.3.0 static #private incompatible with importHelpers and tslib 2.1 #43501

arciisine opened this issue Apr 2, 2021 · 4 comments
Assignees
Labels
Bug A bug in TypeScript Domain: tslib and Helper Functions Fixed A PR has been merged for this issue

Comments

@arciisine
Copy link

Bug Report

πŸ”Ž Search Terms

tslib 4.3 __classPrivateFieldGet

πŸ•— Version & Regression Information

4.3.0-dev.20210401

  • I was unable to test this on prior versions because this is related to a new feature in 4.3

⏯ Playground Link

I'm unable to provide a playground link, as importHelpers is not reflecting in the playground, when selected.

Playground link with relevant code

πŸ’» Code

/**
 * Module utils
 */
export class ModuleUtil {

  static #handlers: ModuleHandler[] = [];
  /**
   * Add module post processor (post-load)
   *
   * @param handler The code to run on post module load
   */
  static addHandler(handler: ModuleHandler) {
    this.#handlers.push(handler);
  }

πŸ™ Actual behavior

The typescript compiler is showing the below error:

image

And I can see in tslib 2.1 that there is no support for more than 2 parameters for __classPrivateFieldGet. It looks like there is no compatible tslib for the 4.3.0 beta.

πŸ™‚ Expected behavior

importHelpers should be able to work with 4.3.

@DanielRosenwasser
Copy link
Member

@rbuckton can you port the helper changes and additions over to tslib? I'll also need some help figuring out versioning there.

@arciisine
Copy link
Author

Looks like a PR has already been merged to update the helpers: microsoft/tslib#146.

@rbuckton
Copy link
Member

rbuckton commented Apr 3, 2021

@DanielRosenwasser As far as tslib is concerned, the tslib change is backwards compatible so we can publish as a minor or patch version.

@DanielRosenwasser DanielRosenwasser added the Fixed A PR has been merged for this issue label Apr 5, 2021
@DanielRosenwasser
Copy link
Member

tslib 2.2.0 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: tslib and Helper Functions Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants