Hacker News new | ask | show | jobs
by cronin101 1087 days ago
Neat, I hadn’t thought about the covariance/contravariance implications of structural typing when getting irritated by this shortcoming yesterday! Small nitpick, the `KeyboardShortcutEvent` snippet at the end would be a great place to showcase `Pick<Foo, “bar”|”baz”>`
1 comments

I thought of using Partial<T> for the last example, as well. Obviously this has its own implications; right tool for the job and all that.