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

support typescript for suspense props #1

Open
r17x opened this issue Oct 14, 2022 · 1 comment
Open

support typescript for suspense props #1

r17x opened this issue Oct 14, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@r17x
Copy link
Owner

r17x commented Oct 14, 2022

Is your feature request related to a problem? Please describe.
When integrated this plugin with project that use typescript. Type-Check will throw error type cause suspense props is unknown type definition

Describe the solution you'd like
We need to tell typescript compiler if this plugin enable

Describe alternatives you've considered
Manually extends React Type to support suspense props

suspense?: SuspensePropse["fallback"];

Additional context

@r17x r17x added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 14, 2022
@r17x
Copy link
Owner Author

r17x commented Oct 25, 2022

Easy solution is

  • write the type definition with extends react namespace from @types/react.
  • update package.json and add field types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant