-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Clean up types #1016
Clean up types #1016
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4d9a0bf:
|
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 just encounter an issue like specifying the ConfigInterface
in another PR. Could we consider exporting the paritial one?
export type ConfigInterface = Partial<{....}>
It is already the partial one: |
Published as |
Maybe also rename
|
This PR does 2 things:
ConfigInterface
was changed in types: makes types fn and config and key more strictly #946, which might be breaking. However it's not released as stable yet. This PR fixes it.For 1, the cause is that properties in
ConfigInterface
are no longer optional. And if a user creates a custom hook the type might be broken:For 2, updated types are:
keyInterface
Key
ConfigInterface
SWRConfiguration
responseInterface
SWRResponse
SWRInfiniteConfigInterface
SWRInfiniteConfiguration
SWRInfiniteResponseInterface
SWRInfiniteResponse
revalidateType
Revalidator
RevalidateOptionInterface
RevalidatorOptions
CacheInterface
Cache
The deprecated ones will be kept until 1.0.