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

feat(gatsby-plugin-typescript): add support for ECMAScript Private Fields #21159

Closed
wants to merge 1 commit into from

Conversation

Colt45s
Copy link

@Colt45s Colt45s commented Feb 3, 2020

Description

Similar to #19302, TypeScript 3.8 beta has supported ECMAScript Private Fields but this is only beta. (not stable)

So I create PR for Draft.

@Colt45s Colt45s changed the title feat(gatsby-plugin-typescript): add support for ECMAScript Private Fi… feat(gatsby-plugin-typescript): add support for ECMAScript Private Fields Feb 3, 2020
@Colt45s Colt45s requested review from lsanwick, pvdz and pieh and removed request for lsanwick February 3, 2020 23:45
@pvdz
Copy link
Contributor

pvdz commented Feb 11, 2020

Just to be clear; this is not the same as ?. and ?? because those features are now actually part of the spec. They are essentially, now, "proper JS". As such we've made sure people can use them.

Private fields do not have this status yet. They are stage 3 (see https://tc39.es/proposal-class-fields/#prod-FieldDefinition). I don't know how this resonates to/in the TS world.

Beyond that, can you please tell us what you'd like to do with this draft PR? I'm not sure whether we'll merge this (leaving that up to @blainekasten and @ascorbic to decide) as long as its stage 3.

@ascorbic
Copy link
Contributor

Thanks for this. I'd usually be wary of supporting anything at stage 3, but if this is in 3.8 without a flag then I think we should probably merge this when it's released, subjects to the caveats below. There's already native support in Chrome, and I don't think there's any danger of the syntax changing now.

Things we'd need to do beforehand though:

  • Decide if we should use the loose option
  • Check for eslint support

I don't think we should start using it in our own TS code until it's stage 4 though.

@ascorbic ascorbic self-requested a review February 11, 2020 11:10
@LekoArts
Copy link
Contributor

Feel free to reopen when this is actually stable, in the meantime I'll close this.

@LekoArts LekoArts closed this Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants