-
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
[TS] TypeScript errors updating gatsby 2.3.33 to 2.3.34 #13754
Comments
IMO this should probably get removed from exported types (and switched with an
Yeah, I think Gatsby will need to re-name Node here. There was a GatsbyNode - but I feel like that does something else? For the rest, you have more strict mode options turned on than my project did. We need to get a linter on the dts at some point, not sure if I'll have much time until the weekend to look into more of this, so it might be wise to ship a PR yourself 👍 |
Looks like I can probably PR everything but the linter shortly if that sounds acceptable. |
I think that makes sense - yeah! |
|
Description
Upon attempting to update the core gatsby package from 2.3.33 to 2.3.34, I ran into a few TypeScript errors introduced in #13619:
@types/express
now. Easy enough to add to my project, but maybe it should be a Gatsby dep/devDep? Not sure.Gatsby's(resolved with point 5 below)Node
interface conflicts withNode
from the TypeScriptdom
library. Not sure how to handle this, maybe the declarations just need wrapped in a namespace? @orta or someone will probably know the right:tm: solution.addThirdPartySchema
andcreateTypes
just need their return types specified (looks likevoid
- easy PR, but wanted to figure out these other errors as well).addThirdPartySchema
andcreateTypes
declarations currently flag theplugin
parameter as optional and thetraceId
parameter as required, but it looks like in realityplugin
is required andtraceId
is optional (in both cases)? Another easy fix if I'm understanding it correctly.createParentChildLink
signature is slightly incorrect (renaming while destructuring vs. typing).(Side note:
"skipLibCheck": true
will silence the errors, but that's just a hack.)Steps to reproduce
Create a Gatsby+TS project with
"strict": true
intsconfig.json
and check the types withtsc
.Expected result
Type checking should pass.
Actual result
Type checking fails.
Environment
The text was updated successfully, but these errors were encountered: