-
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
Why is there not a @types/gatsby package? #14535
Comments
Types are available, and are distributed alongside the library. https://unpkg.com/gatsby@2.8.2/index.d.ts Hope this helps -- thanks! |
Thanks for the response. This is exactly what I'm looking for. |
@DSchau Sorry for bothering, but using types from Gatsby create a false error for me: createNode({
...obj,
id: createNodeId(`Obj-${post.id}`),
parent: "",
children: [],
internal: {
type: "Obj",
content: nodeContent,
contentDigest: crypto
.createHash("md5")
.update(nodeContent)
.digest("hex"),
},
}) It complains:
What I think is happening is here:
It expects a Node as an argument where Maybe there should be a |
@alexluong we'd love a PR making those types a little more flexible! |
@DSchau Created a PR with a follow-up question. We can discuss over there! Thanks for the support. |
Hi,
I'm trying out TypeScript with Gatsby for the first time and quite surprised that there is no
@types/gatsby
package. I think it would be helpful, especially if someone want to implement the Node/Browser/SSR in TypeScript.Some example code:
The text was updated successfully, but these errors were encountered: