-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add types #61
feat: add types #61
Conversation
test/types/intex.test-d.ts
Outdated
exposeRoute: true, | ||
exposeRouteOptions: { | ||
url: '/custom' | ||
} as RouteOptions |
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.
This is confusing me. If you do "as RouteOptions" then it means that even invalid values are handled as valid. So you should remove the "as RouteOptions". If e.g. RouteOptions has options you dont use, e.g. handler use Omit utility type. e.g. Omit<RouteOptions, 'handler'>
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.
I checked a bit the ts docs and the Partial
structure works best as Omit
does not let the user to customize those parameters
Last nitpick: The typescript documentation uses semicolons everywhere and also a google search says that: But that is something you can decide. |
fixes #60