Property 'enter' does not exist on type '{ readonly enter?: ASTVisitFn<NameNode> ...
See original GitHub issueDescribe the bug
Getting the following build errors with TS:
node_modules/@graphql-codegen/plugin-helpers/oldVisit.d.ts:5:75 - error TS2339: Property 'enter' does not exist on type '{ readonly enter?: ASTVisitFn<NameNode> | undefined; readonly leave: ASTReducerFn<NameNode, unknown>; } | { readonly enter?: ASTVisitFn<DocumentNode> | undefined; readonly leave: ASTReducerFn<...>; } | ... 41 more ... | undefined'.
5 enter?: Partial<Record<keyof NewVisitor, NewVisitor[keyof NewVisitor]['enter']>>;
~~~~~~~
node_modules/@graphql-codegen/plugin-helpers/oldVisit.d.ts:6:75 - error TS2339: Property 'leave' does not exist on type '{ readonly enter?: ASTVisitFn<NameNode> | undefined; readonly leave: ASTReducerFn<NameNode, unknown>; } | { readonly enter?: ASTVisitFn<DocumentNode> | undefined; readonly leave: ASTReducerFn<...>; } | ... 41 more ... | undefined'.
6 leave?: Partial<Record<keyof NewVisitor, NewVisitor[keyof NewVisitor]['leave']>>;
To Reproduce
Use together:
"@graphql-codegen/plugin-helpers": "^2.4.1",
"graphql": "^16.3.0"
Then just importing it will trigger the bug:
import type { Types } from '@graphql-codegen/plugin-helpers';
- My GraphQL schema:
N/A
- My GraphQL operations:
N/A
- My
codegen.yml
config file:
N/A
Expected behavior
Not produce build errors.
Environment:
- OS: macOS
@graphql-codegen/plugin-helpers
: 2.4.1- NodeJS: v14.17.6
Additional context
N/A
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:15
Top Results From Across the Web
Property 'value' does not exist on type 'Readonly<{}>'
error TS2339 : Property 'value' does not exist on type 'Readonly<{}>'. I got this error in the two lines I commented on the...
Read more >Solved - Property 'X' does not exist on type 'Readonly<{}>' in ...
This error occurs when we access a prop or state property that we have not explicitly given a type inside the React class...
Read more >React: Property 'X' does not exist on type 'Readonly<{}>'
The React.js error "Property does not exist on type 'Readonly<{}>'" occurs when we try to access the props or state of a class...
Read more >Property missing in type 'Readonly<any>' #19624 - GitHub
Readonly is a mapped type. it is a type transformation that happens on the input, in this case any . so Readonly<any> is...
Read more >Useful Patterns by Use Case - React TypeScript Cheatsheets
In future, the need to forwardRef may go away in React 17+, but for now we still have ... {/* Error: Property 'toPrecision'...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Will do, if I can repro the issue again.
Good question.
Seems like no?