-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this
Milestone
Description
Typechecking this code:
var x: string[] = ["A","B","C"];
x = x.concat([1,2,3])
will throw up with
Argument of type 'number[]' is not assignable to parameter of type 'string'.
This happens even without the x =
assignment, and that shows that it would make more sense if the error was either of:
Argument of type 'number' is not assignable to parameter of type 'string'.
or
Argument of type 'number[]' is not assignable to parameter of type 'string[]'.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightWell scoped, documented and has the green lightHelp WantedYou can do thisYou can do this