Re:TypeScript is terrible for library developers
by jeremyjacob on Tuesday August 23, 2022 @05:31PM
(#32571831)
Fortunately that's not too difficult:
let x: {[key: string]: Type}
But maybe the documentation is lacking here?
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.