Open
Description
🔎 Search Terms
jsdoc generics
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
No response
💻 Code
Given the following code:
function api<T>(endpoint: string): Promise<T> {
return fetch(endpoint).then(res => res.json());
}
When I consume the api
function in a .js
file, I'd still like to leverage the T
generic via JSDoc-only. There currently isnt a straightforward way to do this, and the DX of this could definitely be improved.
🙁 Actual behavior
Cant leverage the T
generic
🙂 Expected behavior
I can leverage the T
generic
Additional information about the issue
This is a long overdue feature :)