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

fix: avoid type mismatch with Rollup (fix #7843) #8701

merged 2 commits into from Jun 24, 2022

fix: avoid type mismatch with Rollup (fix #7843) #8701

merged 2 commits into from Jun 24, 2022


Copy link

@kachick kachick commented Jun 21, 2022


TS2430 appears when using skipLibCheck: false

I have some React projects. Sometimes I would like to configure skipLibCheck: false, however it makes errors only here.

fixes #7843

Additional context

Initially tried to merge original types more, but I've given up πŸ™‡β€β™‚οΈ

I don't have confident for below points.

  • Wihch option should be preferred between strictNullChecks: true and strict: true in the tsconfig.check.json?
  • Wihch prefix should be preferred between fix: and types: in the commit message?

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

TS2430 appears when using `skipLibCheck: false`
Copy link

It seems changing method (foo?(): void) to property (foo?: () => void) works.

Copy link

netlify bot commented Jun 23, 2022

βœ… Deploy Preview for vite-docs-main ready!

Name Link
πŸ”¨ Latest commit 6c4fe1f
πŸ” Latest deploy log
😎 Deploy Preview
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor Author

kachick commented Jun 23, 2022

Wow thank you for letting me know!
Replacing it and adding isEntry passed the typecheck πŸ™

However CI on macos looks failing πŸ‘€

Copy link

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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


@patak-dev patak-dev merged commit 87e51f7 into vitejs:main Jun 24, 2022
Copy link
Contributor Author

kachick commented Jun 24, 2022

Thank you for review and merging πŸ™

@kachick kachick deleted the issue-7843-simple-omit branch June 24, 2022 07:04
@sapphi-red sapphi-red mentioned this pull request Dec 5, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
4 participants