Skip to content

Show generic arrow function syntax in the Generics handbook - #3714

Open
Jake Wang (jakezwang) wants to merge 1 commit into
microsoft:v2from
jakezwang:fix/issue-3196-20261121
Open

Jake Wang (jakezwang) wants to merge 1 commit into
microsoft:v2from
jakezwang:fix/issue-3196-20261121

Conversation

@jakezwang

Copy link
Copy Markdown

Use the existing identity example to introduce generic arrow functions. Explain why a trailing comma matters when a single type parameter appears in a TSX file.

Fixes #3196.

Validated the example in a .tsx file with TypeScript 5.9.3 using --strict --noEmit --jsx preserve, including assignment of the inferred result to a string.

Prepared with assistance from OpenAI Codex.

Assisted-by: OpenAI Codex
Signed-off-by: Jake Wang <jakezwang@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add in the documentation the syntax for Typescript arrow functions with generics and how to avoid ambiguity with JSX using a trailing comma

1 participant