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: [4.7] support instantiation expressions #4938

Merged

Conversation

sosukesuzuki
Copy link
Contributor

@sosukesuzuki sosukesuzuki commented May 9, 2022

PR Checklist

Overview

ref: Babel's implementation (babel/babel#14457)

@nx-cloud
Copy link

nx-cloud bot commented May 9, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 5d94bbf. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @sosukesuzuki!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented May 9, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 5d94bbf
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/62854ec79653a5000811dc86
😎 Deploy Preview https://deploy-preview-4938--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bradzacher
Copy link
Member

i merged the version bump so this can be rebased on top of main

@sosukesuzuki sosukesuzuki marked this pull request as ready for review May 17, 2022 15:20
@bradzacher bradzacher added enhancement New feature or request AST PRs and Issues about the AST structure labels May 17, 2022
@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #4938 (5d94bbf) into main (08ae2c4) will increase coverage by 0.38%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4938      +/-   ##
==========================================
+ Coverage   91.32%   91.71%   +0.38%     
==========================================
  Files         132      361     +229     
  Lines        1487    12124   +10637     
  Branches      224     3518    +3294     
==========================================
+ Hits         1358    11119    +9761     
- Misses         65      657     +592     
- Partials       64      348     +284     
Flag Coverage Δ
unittest 91.71% <100.00%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/visitor-keys/src/visitor-keys.ts 100.00% <ø> (ø)
packages/typescript-estree/src/convert.ts 98.39% <100.00%> (ø)
packages/eslint-plugin-tslint/src/custom-linter.ts 100.00% <0.00%> (ø)
packages/utils/src/ts-eslint/CLIEngine.ts 66.66% <0.00%> (ø)
...gin/src/rules/naming-convention-utils/validator.ts 95.54% <0.00%> (ø)
...ges/eslint-plugin/src/rules/no-extraneous-class.ts 100.00% <0.00%> (ø)
packages/visitor-keys/src/get-keys.ts 100.00% <0.00%> (ø)
packages/eslint-plugin/src/rules/semi.ts 92.85% <0.00%> (ø)
...ages/eslint-plugin/src/rules/ban-tslint-comment.ts 100.00% <0.00%> (ø)
packages/eslint-plugin/src/rules/no-this-alias.ts 100.00% <0.00%> (ø)
... and 221 more

@bradzacher bradzacher changed the title feat(typescript-estree): Instantiation expressions feat: [4.7] support instantiation expressions May 19, 2022
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM!
Thanks so much for helping us prep for TS4.7

@bradzacher bradzacher merged commit 79fbc77 into typescript-eslint:main May 19, 2022
@bradennapier
Copy link

bradennapier commented May 24, 2022

Is this released? As its on main I am just unsure if that triggers a release. Because the makeBox example is still returning as if it does not.

function makeBox<T>(value: T) {
  return { value };
}

const makeStringBox = makeBox<string>

image

"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"eslint": "8.16.0",
"typescript": "rc"

Typescript is 4.7.1-rc

@bradzacher
Copy link
Member

This is all supported in our project!
This looks like a bug in TS itself, which I have filed:
microsoft/TypeScript#49223

@sosukesuzuki sosukesuzuki deleted the instantiation-expression branch May 31, 2022 11:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AST PRs and Issues about the AST structure enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants