Skip to content
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

types: add generic for SWRInfiniteKeyLoader #2104

Merged
merged 1 commit into from
Aug 5, 2022
Merged

Conversation

jason89521
Copy link
Contributor

Description

Sometimes I need to declare a getKey function individually, but the original type of SWRInfiniteKeyLoader use any | null for the second argument. For better type definition, I think this type should have generic.

Additional infomation

It seems that "swr/_internal": ["./_internal/index.ts"] is missing in compilerOptions.paths for tsconfig.ts?

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 5, 2022

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 397e237:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration

Copy link
Member

@huozhi huozhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@huozhi
Copy link
Member

huozhi commented Aug 5, 2022

It seems that "swr/_internal": ["./_internal/index.ts"] is missing in compilerOptions.paths for tsconfig.ts?

Nice catch! Feel free to submit a PR to add it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants