Uh oh!
There was an error while loading. Please reload this page.
Fix Array interface (#10886) - #11294
Conversation
Ryan Cavanaugh (RyanCavanaugh)
commented
Oct 3, 2016
What's the bug tracking this change? |
falsandtru (falsandtru)
commented
Oct 3, 2016
Fixes #10886 |
falsandtru (falsandtru)
commented
Oct 13, 2016
Can someone review this? |
Mohamed Hegazy (mhegazy)
commented
Dec 30, 2016
sorry for the late reply. can you refresh this PR? |
falsandtru (falsandtru)
commented
Jan 14, 2017
done |
falsandtru (falsandtru)
commented
Jan 18, 2017
now updating |
There was a problem hiding this comment.
#10886 is not acceptable because of confusing with tuple types.
| >regExpExecArrayValue.slice() : string[] | ||
| >regExpExecArrayValue.slice : (start?: number, end?: number) => string[] | ||
| >regExpExecArrayValue.slice() : RegExpExecArray | ||
| >regExpExecArrayValue.slice : (start?: number, end?: number) => RegExpExecArray |
There was a problem hiding this comment.
Wrong, must return string[]. It can avoid by overloading in RegExpExecArray and RegExpMatchArray.
| >t.slice() : [number, string] | ||
| >t.slice : { (start?: number, end?: number): (string | number)[]; (): [number, string]; } | ||
| >t.slice : { (start?: number, end?: number): [number, string]; (): [number, string]; } | ||
| >t : [number, string] |
There was a problem hiding this comment.
Wrong, concat and slice methods must not return this type when it is a tuple type. It cannot avoid.
improved. i tried to improve RegExp{Exec,Match}Array too, interfaceRegExpMatchArrayextendsArray<string>{index?: number;input?: string;concat(): string[];slice(start?: 0): string[];}interfaceRegExpExecArrayextendsArray<string>{index: number;input: string;concat(): string[];slice(start?: 0): string[];}but i didn't complete that because it makes 637 errors. i cannot fix such a lot of errors. |
falsandtru (falsandtru)
commented
Jan 20, 2017
Mohamed Hegazy (@mhegazy) can you review before conflicting again? |
falsandtru (falsandtru)
commented
Jan 26, 2017
falsandtru (falsandtru)
commented
Feb 6, 2017
Mohamed Hegazy (mhegazy)
commented
May 23, 2017
Fixed by #12784 |
No description provided.