-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
import type { DocumentNode } from 'graphql/language/ast'; '=' expected. error #187
Comments
I'm experiencing the same problem |
I've fixed this in this pull request #191 |
This syntax comes from TS 3.8 and up. You are probably on an older version. I don't think the |
This comment has been minimized.
This comment has been minimized.
@GerbenRampaart yep it is now required to have |
rror: node_modules/@aws-amplify/api-graphql/lib-esm/types/index.d.ts:1:30 - error TS7016: Could not find a declaration file for module 'graphql/error/GraphQLError'. 'xxx/node_modules/graphql/error/GraphQLError.js' implicitly has an 'any' type. Try npm install @types/graphql if it exists or add a new declaration (.d.ts) file containing declare module 'graphql/error/GraphQLError'; 1 import { GraphQLError } from 'graphql/error/GraphQLError'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add index.d.ts under src with: declare module 'graphql/language/ast' { export type DocumentNode = any }
declare module 'graphql/error/GraphQLError' { export type GraphQLError = any } |
Typescript throws this error.
`node_modules/graphql-request/dist/types.d.ts(1,13):
'=' expected. TS1005
`
I fixed it by editing
nodemodules/graphql-request/dist/types.d.ts
file by removingtype
from line 1. And the error is gone. But am not sure that is really a fix.The text was updated successfully, but these errors were encountered: