Like a mail merge — the template has a placeholder, and TypeScript fills in every option.
`on${Capitalize<EventName>}` distributes over the EventName union: "click" → "onClick", "focus" → "onFocus", "blur" → "onBlur".
> Handler = "onClick" | "onFocus" | "onBlur" > Type-checked: no typos possible
Like a mail merge — the template has a placeholder, and TypeScript fills in every option.
`on${Capitalize<EventName>}` distributes over the EventName union: "click" → "onClick", "focus" → "onFocus", "blur" → "onBlur".
> Handler = "onClick" | "onFocus" | "onBlur" > Type-checked: no typos possible
Sign in to cast your vote
Sign in to share your feedback and join the discussion.