-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Poor typings in ExecutionArgs
in @envelop/types
#2085
Comments
Hi, yes the typing is not really great there... |
For your information, the typing is a custom one here because we wanted to stay agnostic on the actual engine or schema building libraries you are using. We are searching for an happy path for you to customize this types and avoid the I will keep you update here once we will take action on this. The workaround during this time is, as you pointed out, to type cast each time you use it... Sorry about that, we should come with a better solution soon. |
Is your feature request related to a problem? Please describe.
I enabled
@typescript-eslint/no-unsafe-member-access
(part ofplugin:@typescript-eslint/recommended-type-checked
) and I get into trouble now forUnsafe member access .definitions on an `any` value.
This is due to the typings in
ExecutionArgs
in@envelop/types
v5.0.0
which look like this:Example:
Is unsafely accessing
definitions
ondocument: any
.Describe the solution you'd like
Isn't there anything we can do to give the user more hints that we have some sort of clue what these properties are? It is set by the framework isn't it so we should know that it is at least e.g.
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: