We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getContextuallyTypedParameterType should return undefined instead of any
getContextuallyTypedParameterType
undefined
any
let x: { f(a, b): any, g(): any } = { f: (a = "none", b) => a.length, g: (a = "none", b) { return a.length } }
For both f and g, the parameter a: any but should be a: string.
f
g
a: any
a: string
I also ran into this with implemented/inherited functions in PR #6118.
The text was updated successfully, but these errors were encountered:
I don't think that's correct. In this example (slightly modified):
let x: { f(a: any, b: any): any, g(): any } = { f: (a = "none", b) => a.length, g: (a = "none", b) { return a.length } }
... you shouldn't see any implicit any warnings, which would happen if getContextuallyTypedParameterType return undefined
Sorry, something went wrong.
Maybe it should be handled above (getTypeForVariableLikeDeclaration) or below (getTypeAtPosition) then.
getTypeForVariableLikeDeclaration
getTypeAtPosition
i agree with @RyanCavanaugh this is by design.
sandersn
No branches or pull requests
getContextuallyTypedParameterType
should returnundefined
instead ofany
For both
f
andg
, the parametera: any
but should bea: string
.I also ran into this with implemented/inherited functions in PR #6118.
The text was updated successfully, but these errors were encountered: