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

Support Typescript 5.0 const modifier on type parameters #260

Closed
adrianhunter opened this issue Jan 20, 2023 · 2 comments
Closed

Support Typescript 5.0 const modifier on type parameters #260

adrianhunter opened this issue Jan 20, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers typescript TypeScript compatibility or extensions

Comments

@adrianhunter
Copy link

Typescript 5.0 introduces a new "const" modifier for type parameters. Related PR: microsoft/TypeScript#51865

Where is the const type modifier allowed?
The const modifier is permitted on type parameters of functions, methods, and classes. It is an error to apply the const modifier to type parameters of interfaces and type aliases.

Would be great to have this in civet, as I already have some code that uses this new feature.

How to use this new feature in normal typescript with vscode?
npm install typescript@next in any project, then select this specific typescript version in the bottom right of vscode, or directly add this to your vscode settings.json
"typescript.tsdk": "node_modules/typescript/lib"

@STRd6 STRd6 added enhancement New feature or request typescript TypeScript compatibility or extensions labels Jan 21, 2023
@STRd6
Copy link
Contributor

STRd6 commented Jan 21, 2023

Related: microsoft/TypeScript#51362

Looks like TS will have the 5.0 final release on March 14th so we'd want to be compatible before then.

@STRd6 STRd6 added the good first issue Good for newcomers label Jan 22, 2023
@STRd6
Copy link
Contributor

STRd6 commented Apr 13, 2023

Fixed in a28e796

@STRd6 STRd6 closed this as completed Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers typescript TypeScript compatibility or extensions
Projects
None yet
Development

No branches or pull requests

2 participants