Hyeseong Kim
Hyeseong Kim
Hi @sanjaypojo, thanks for your interest in this issue :) The data fields can easily be typed with the query type already generated, as you mentioned. Actually, pageContext also has...
And, I found it inconvenient to include a lot of nullability in the generated type because the Gatsby schema is inferred fields as Nullable if not explicitly declared as non-null....
Oh, I just realized gatsby already provides some utility types for page props https://github.com/gatsbyjs/gatsby/blob/a72caa67f8/packages/gatsby/index.d.ts#L33-L120
This has a story. v1 did that. The main goal of this plugin is DX enhancement. I wanted to provide an auto-import to keep the module usecase, but because of...
See https://github.com/cometkim/gatsby-plugin-typegen/pull/47 for more details
> Typescript now explicitly discourages namespaces: It's not to be used as a replacement for JavaScript objects and isn't relevant as long as the plugin deals only with **types** without...
Ah I see, you don't even have `tsconfig.json`, I guess it will work after running `tsc --init`
FYI: This will never work with Yarn 2
And when my plugin had used this approach by default before, TypeScript did detect changes in node_modules rather slower than in src. (in VSCode, not sure it's IDE dependent)
@d4rekanguok you should checkout the typegen plugin. Since v2, I've moved generated type definitions into a specific namespace declaration, TypeScript will understand the definition without importing module. NexusJS also has...