TypeProps icon indicating copy to clipboard operation
TypeProps copied to clipboard

Switch to symbols to namespace props

Open SimonMeskens opened this issue 7 years ago • 3 comments

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 avatar May 04 '18 20:05 SimonMeskens

The documentation for interface TypeProps should mention that symbols are preferred

SimonMeskens avatar May 06 '18 14:05 SimonMeskens

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

KiaraGrouwstra avatar May 06 '18 14:05 KiaraGrouwstra

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

SimonMeskens avatar May 06 '18 15:05 SimonMeskens