Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest 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

Open
#3,196 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
55/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript
Domain
documentation

Research direction

Start at the Generics handbook page linked in the issue and review its existing examples and surrounding syntax guidance. Document TypeScript arrow functions with generics, including the trailing-comma form that avoids ambiguity with JSX. Done means the page explains both the syntax and why the trailing comma is useful.

Written by the indexing model from the issue text.

Description

Page URL: https://www.typescriptlang.org/docs/handbook/2/generics.html

Issue: What is the syntax for Typescript arrow functions with generics?

The typescript handbook currently has nothing on arrow functions.

Thomas said this in a comment:

Newer typescript compilers also support trailing comma const foo = <T,>(x: T) => x; to sidestep the JSX ambiguity

If you add this info in the documentation people won't have to resort to that StackOverflow post to discover these features.

Dominant language
TypeScript
Stars
2.6k
Forks
1.5k
Avg merge
2d 12h
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/TypeScript-Website

All issues in microsoft/TypeScript-Website

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.