by danielvaughn · 4y ago · 0 comments
Part of this hook is that users can pass in custom data. I tried to create a type that was basically "an object of any string key, with the type value". Gave up after like an hour of banging my head against my desk. Maybe I'm new to TS, but FFS it should not be that hard to do.
let x: {[key: string]: Type}
But maybe the documentation is lacking here? let x: Record<string, Type>
Pun intended.