Source: sebastiandedeyne.com

The Record type in TypeScript
I can’t count the amount of times I’ve defined an object type with unknown string keys and a specific value type. And despite using it all the time, I can’t for the life of me remember the [key: string] syntax.

Apparently TypeScript has a built in Record type that does exactly that: Keep in touch I occasionally send out a newsletter with personal stories, things I’ve been working on in the past month, and interesting things I come across. Pinky swear that I won't use your data for any other purposes.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners