-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(types): update types to be more concise #314
Conversation
ac39f74
to
631cf6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: optional is not the same as undefined, by removing this, passing an undefined value is not allowed anymore.
I'm almost certain that's not right: https://www.typescriptlang.org/play/?#code/JYOwLgpgTgZghgYwgAgCoQM5mQbwFDKHIAOUA9sdGAJ4D8AXMllKAOYDceAvnngmSCzJIWRuiEBeXCXKUoNRgFcQAEwgxQEFci6cgA This doesn't give a syntax error |
It was off the back of this comment that I made the type just Basically the types reflect the ideal typings and not an enumeration of every single type that could be accepted. By limiting the type this way, we also make the upgrade path for those following the types easier if/when we remove the |
From my end it's ok but I'm only using a few of them for my IDE intellisense. |
| undefined
for props that are already declared optional (undefined
is an implied value)Record
built-in type over object maps