SimonMeskens / TypeProps

Small library for describing HKTs in TypeScript
Apache License 2.0
32 stars 2 forks source link

Switch to symbols to namespace props #8

Open SimonMeskens opened 6 years ago

SimonMeskens commented 6 years ago

I'm waiting for 2.9 to go stable to switch props from unique strings to symbols. From cursory testing, this works out of the box, but it probably needs the new keyof mechanics in 2.9 to work properly.

SimonMeskens commented 6 years ago

The documentation for interface TypeProps should mention that symbols are preferred

KiaraGrouwstra commented 6 years ago

Word of warning: many type level operations like Omit currently cannot deal with symbols as they have no equivalent to keyof.

SimonMeskens commented 6 years ago

@tycho01 2.9 keyof supports symbols and numbers directly, from cursory testing, it handles TypeProps just fine.