Closed renancaraujo closed 2 years ago
@renancaraujo, in my code, the variables is defaulted to dynamic
. Do you know why this is not the case in yours? A different language version?
This is visible to projects that sets implicit-dynamic
to false in the analyzer file.
@renancaraujo, just so we're on the same page. That'd be the strict-raw-types
?
@renancaraujo, can you please check out this PR to see if this solves your issue: #1053
Describe the issue
SubscriptionOptions
,QueryOptions
andMutationOptions
have contructors with an optionalparserFn
parameter and a type parameterTParsed
.When the user desires to omit
parserFn
,TParsed
is still required, even though the existence ofTParsed
without aparserFn
serves no purpose.This creates an error:
A workaround is to pass void as type param:
For a more consistent API, one can make the type parameter optional by specifying a supertype for
TParsed
:In this way,
TParsed
doesn't ever need to be explicitly passed.To Reproduce (MUST BE PROVIDED) Just use this package creating either
SubscriptionOptions
,QueryOptions
orMutationOptions
omittingparserFn
.Expected behavior
TParsed
should not be a required argument ifparserFn
isn't.device / execution context This does not regard any specific device constraint.