-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Cannot use generics in JSDoc object signature #27215
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
Labels
Duplicate
An existing issue was already created
Comments
This was referenced Sep 26, 2018
@sandersn Excellent, appreciate the feedback. Thank you! |
Duplicate of #26883 |
Does anyone have a guess as to why I'm still encountering these kind of errors? I literally just copy and pasted the code from the original poster, and I'm getting errors that were identical to his. I tried to install the latest version of Typescript (currently 3.7), but that didn't help anything. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TypeScript does not appear to support using generics in JSDoc Object types (
Object<string, T>
). Doing so results in errors likeIndex signatures are incompatible. Type 'T' is not assignable to type 'string'.
.TypeScript Version: 3.1.0-dev.20180919
Search Terms:
jsdoc object generic
object generic is not assignable to type
jsdoc object generic index signature
Code
Expected behavior:
No errors.
Actual behavior:
Playground Link: Not applicable (
tsc
behavior).Related Issues: None found.
The text was updated successfully, but these errors were encountered: