Get the latest tech news

What the heck are reverse mapped types?


Let's try to understand what the TypeScript guys mean when they talk about reverse mapped types.

When the fifth of the previous points comes into play, some context sensitive information is provided back from ContextSensitive<{ num: number, str: string }> to the source: the type of the parameters of the functions'f'. The inferred Types must satisfy its constraint too, i.e. it must be an array or a tuple of strings containing some event names belonging to the input HTMLElement, without the'on' prefix. The very first time I’ve heard about reverse mapped types was on Xitter a couple of years ago, thanks to the already mentioned Mateusz, whom I thank for the countless insights he gave me on the topic and for his extensive review of this article.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of heck

heck

Photo of mapped types

mapped types

Related news:

News photo

A heck of a wild bug chase

News photo

What the heck is going on with Helldivers 2?

News photo

What the Heck Is ‘Ordered Liberty’? Beware Poilievre’s Paradox