Skip to content
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

Generic defaults implicit any #14396

Closed
wants to merge 7 commits into from
Closed

Conversation

rbuckton
Copy link
Member

@rbuckton rbuckton commented Mar 1, 2017

This changes the behavior for unsupplied type arguments in a type reference from the current behavior where we infer {}, to instead infer an implicit any. As a result, providing too few type arguments in a type reference will no longer report an error unless the noImplicitAny compiler option is set.

Fixes #13609

constructor() { super(value => String(value)); }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2346: Supplied parameters do not match any signature of call target.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong. we already set T1 and T2 to any, so this should resolve with no errors, the noImplicitAny on the extends clause should be sufficient.

@rbuckton rbuckton closed this May 8, 2017
@mhegazy mhegazy deleted the genericDefaultsImplicitAny branch November 2, 2017 21:00
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants