-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
"x".match(/.*/).index
fails to compile. The String.match
function is declared as:
interface String {
match(regexp: RegExp): string[];
}
Instead, String.match(_: RegExp)
should probably return an interface which is a string[]
but has an extra index
property.
There's also an extra input
property on the array with the value of the this
string.
"abcabc".match(/b/).input === "abcabc"
Originally filed at: http://typescript.codeplex.com/workitem/2175
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue