Remix.run Logo
BoorishBears 6 hours ago

Honestly I got hung up on understanding why for Typescript the declaration of `keys` shouldn't be:

let keys = (keyof typeof users)[]

Like I get it's a contrived example and maybe I'm missing some nuance to it, but if we're obsessed with type-safety why are we treating a array of strings as an array of keys (which are more like atoms)?

I thought the answer might be we're looking for duck typing-ish behavior, but then the proposed take signature doesn't work either?