-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Make generic choices type const #61
base: release/13.x
Are you sure you want to change the base?
Conversation
Oh nice. This is independent of #59 and the work-around is actually covered in the README:
|
Typescript 5 is somewhat "recent" and I think might have to wait for a breaking major update of this package in the future to adopt this, or do more work and support multiple versions: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#version-selection-with-typesversions (Assuming we don't already require Typescript 5! Hmm, should have a test that runs against oldest supported TypeScript.) |
DefinitelyTyped has a handy graphic of their 2-year TypeScript testing support: https://github.com/DefinitelyTyped/DefinitelyTyped#support-window |
Since one can achieve the same with |
I am keeping an eye out for Typescript dependencies in other projects. A new version of typescript-eslint is supporting TypeScript |
To draw your attention, It also has Note that the install size of In contrary |
Thanks @mrazauskas , I had not seen TSTyche. |
While working on #59 I noticed that since TypeScript 5.0 it is possible to declare generic types as const. This infers the value as const. The advantage of this is that the command type is more strictly typed. For this to work we need PR #59, but I wanted to make these new changes in a separate PR.
instead of