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

TypeScript 5.3 Support #7719

Closed
bradzacher opened this issue Oct 4, 2023 · 6 comments · Fixed by #7968
Closed

TypeScript 5.3 Support #7719

bradzacher opened this issue Oct 4, 2023 · 6 comments · Fixed by #7968
Labels
accepting prs Go ahead, send a pull request that resolves this issue dependencies Issue about dependencies of the package New TypeScript Version

Comments

@bradzacher
Copy link
Member

bradzacher commented Oct 4, 2023

https://devblogs.microsoft.com/typescript/announcing-typescript-5-3-beta/

This issue is just to track all of the new features and their implementation state in this project.
As with all releases, we will not necessarily to support all features until closer to the full release when everything the features are stabilised.

Please be patient.

✅ Import Attributes (#7821)

We should take this opportunity to deprecate our import/export .assertions property, and instead implement the import/export .attributes property. The AST shape is otherwise unchanged so it should just be a property deprecation.

From the TS AST side - they deprecated the .assertClause property that we currently use to get the attributes and the intended replacement is .attributes. Otherwise no changes.

✅ Optimizations by Skipping JSDoc Parsing (#7821)

Our usecase was one of the motivators for this change!
We'll want to ensure we are parsing with host.jsDocParsingMode = JSDocParsingMode.ParseForTypeInfo.

This should reduce memory usage and improve parsing performance.

✅ lib.d.ts Updates (#7923)

We will need to regenerate our types within scope-manager.


Other changes with no impact to us

  • Stable Support resolution-mode in Import Types
  • switch (true) Narrowing
    • it's not treated the same as an if condition - so we don't need to worry about updating our rules to match this, I think?
  • Narrowing On Comparisons to Booleans
  • instanceof Narrowing Through Symbol.hasInstance
  • Checks for super Property Accesses on Instance Fields
  • Interactive Inlay Hints for Types
  • Optimizations by Comparing Non-Normalized Intersections
  • Consolidation Between tsserverlibrary.js and typescript.js
    • Once we drop <5.3 we can switch everything to import from the root export. But for now we need backwards compat.
  • Breaking Changes and Correctness Improvements
    lib.d.ts Changes
    • Checks for super Accesses on Instance Properties
@bradzacher
Copy link
Member Author

Full support will release with our next release
https://typescript-eslint.io/users/releases

@fisker
Copy link
Contributor

fisker commented Nov 27, 2023

Hello, @JoshuaKGoldberg @bradzacher I just want to confirm that we are parsing JSDoc parsing with ts.JSDocParsingMode?.ParseForTypeInfo now?

https://github.com/typescript-eslint/typescript-eslint/pull/7821/files#diff-cbf5bf03c221198561f9094fd58b4cec3ef051148659ec06f838a19a1160ce8bR68

For Prettier, we don't care about JSDoc, do you think it's reasonable to use ParseNone?

@bradzacher
Copy link
Member Author

@fisker actually we should pass it through for you (#7997)

@fisker

This comment was marked as outdated.

@fisker
Copy link
Contributor

fisker commented Nov 27, 2023

@JoshuaKGoldberg
Copy link
Member

Your wish is our command ✨🧞‍♂️

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2023
@bradzacher bradzacher unpinned this issue Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue dependencies Issue about dependencies of the package New TypeScript Version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants