Comment

Comment by epolanski

Sure, there's many other ways to type it, but none adds any kind of additional safety or strictness over Record<any, any> which was my point that `any` is the correct type in many cases, except when it widens a type.

But in my case it's not widening anything, in Record<A, B>, B can already be `any`thing.

People tend to see it as an unsafe escape hatch (which is how it is abused), but it's just a set of all possible types.

parent epolanski 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton