RegExpExecArray should extends Array<string>

instead of copying all the methods of Array<string>
This commit is contained in:
Ivo Gabe de Wolff
2014-08-09 12:03:14 +02:00
parent c71e596ba8
commit 39921a065d

29
src/lib/core.d.ts vendored
View File

@@ -775,36 +775,9 @@ declare var Date: {
now(): number;
}
interface RegExpExecArray {
[index: number]: string;
length: number;
interface RegExpExecArray extends Array<string> {
index: number;
input: string;
toString(): string;
toLocaleString(): string;
concat(...items: string[][]): string[];
join(separator?: string): string;
pop(): string;
push(...items: string[]): number;
reverse(): string[];
shift(): string;
slice(start?: number, end?: number): string[];
sort(compareFn?: (a: string, b: string) => number): string[];
splice(start: number): string[];
splice(start: number, deleteCount: number, ...items: string[]): string[];
unshift(...items: string[]): number;
indexOf(searchElement: string, fromIndex?: number): number;
lastIndexOf(searchElement: string, fromIndex?: number): number;
every(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
some(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
map(callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): any[];
filter(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): string[];
reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
}