-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Type error in main gatsby package index.d.ts: Type 'Node' is not generic #31324
Comments
Makes sense to me 👍 Are you interested in putting up a PR with this change? We will gratefully merge it (make sure to tag me in the PR if you are up to it). |
I can do that. I assume that line would just return to an intersection: |
Yeah, |
I'll get it fixed before the stable release |
So unfortunately we won't be able to immediately run our type checking on The https://github.com/gatsbyjs/gatsby/blob/master/scripts/check-ts.js file picks up directories that have Then the existing Since we have So while it shows the incorrect type it also has too much other stuff in there. |
Thanks, sorry I didn't get to it. Regarding the |
Description
Not a dupe of #31135
PR #30819 is causing a type error on type checks. This is an issue with [email protected] and the default branch.
Specifically, this change where the
Node
type is treated as generic, but you can see here that it is not.Steps to reproduce
Run a typescript type checker on
packages/gatsby/index.d.ts
. I noticed that the typescript checker in this repo only checks files in packagesrc
folders. It may be worth adding *.d.ts files as well, at least those in the main gatsby package to avoid errors like this in the future.Expected result
No type error.
Actual result
Environment
The text was updated successfully, but these errors were encountered: