Repository navigation
Generic defaults implicit any - #14396
Closed
Ron Buckton (rbuckton) wants to merge 7 commits into
Closed
Ron Buckton (rbuckton) wants to merge 7 commits into
Ron Buckton (rbuckton) wants to merge 7 commits into
Conversation
Mohamed Hegazy (mhegazy)
suggested changes
Mar 12, 2017
| !!! error TS2707: Type parameter 'T2' implicitly has type 'any' because it was not supplied. | ||
| constructor() { super(value => String(value)); } | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| !!! error TS2346: Supplied parameters do not match any signature of call target. |
Contributor
There was a problem hiding this comment.
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.
This was referenced Mar 24, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the behavior for unsupplied type arguments in a type reference from the current behavior where we infer
{}, to instead infer an implicitany. As a result, providing too few type arguments in a type reference will no longer report an error unless thenoImplicitAnycompiler option is set.Fixes #13609