You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can only speculate as to exactly why this is, but here is my best guess based on experimenting:
Some initial compilation occurs to generate the .d.ts in the cache location
This initial compilation reports ts errors, maybe because of hard-coded paths, or circular dependencies between the generated types and the user's code. Either way, errors are expected before the generated types are correct location.
With noEmitOnError: true set, the .d.ts is never emitted and cannot be copied to @types/graphql-let/__generated__. The final type-check by graphql-let subsequently fails.
My workaround for this is the TSConfigFile config option (thank you for that!):
It would be neater if the noEmitOnError option was set to false before performing ts compilation (essentially ignoring this option in the user's tsconfig). Or, this edge case could be added to the readme, describing the workaround above. This took me a couple of hours to figure out and might save someone else some pain :)
This would probably also apply to the noEmit option; maybe some others too.
The text was updated successfully, but these errors were encountered:
I can only speculate as to exactly why this is, but here is my best guess based on experimenting:
noEmitOnError: true
set, the .d.ts is never emitted and cannot be copied to@types/graphql-let/__generated__
. The final type-check by graphql-let subsequently fails.My workaround for this is the
TSConfigFile
config option (thank you for that!):.graphql-let.yml:
tsconfig.graphql-let.json:
It would be neater if the
noEmitOnError
option was set tofalse
before performing ts compilation (essentially ignoring this option in the user's tsconfig). Or, this edge case could be added to the readme, describing the workaround above. This took me a couple of hours to figure out and might save someone else some pain :)This would probably also apply to the
noEmit
option; maybe some others too.The text was updated successfully, but these errors were encountered: