Skip to content

Commit 7bf846a

Browse files
Update LKG.
1 parent 6070dcc commit 7bf846a

File tree

4 files changed

+2260
-893
lines changed

4 files changed

+2260
-893
lines changed

bin/lib.core.d.ts

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ interface String {
317317
* Matches a string with a regular expression, and returns an array containing the results of that search.
318318
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
319319
*/
320-
match(regexp: string): string[];
320+
match(regexp: string): RegExpMatchArray;
321321

322322
/**
323323
* Matches a string with a regular expression, and returns an array containing the results of that search.
324324
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
325325
*/
326-
match(regexp: RegExp): string[];
326+
match(regexp: RegExp): RegExpMatchArray;
327327

328328
/**
329329
* Replaces text in a string, using a regular expression or search string.
@@ -790,39 +790,16 @@ declare var Date: {
790790
now(): number;
791791
}
792792

793-
interface RegExpExecArray {
794-
[index: number]: string;
795-
length: number;
793+
interface RegExpMatchArray extends Array<string> {
794+
index?: number;
795+
input?: string;
796+
}
796797

798+
interface RegExpExecArray extends Array<string> {
797799
index: number;
798800
input: string;
799-
800-
toString(): string;
801-
toLocaleString(): string;
802-
concat(...items: string[][]): string[];
803-
join(separator?: string): string;
804-
pop(): string;
805-
push(...items: string[]): number;
806-
reverse(): string[];
807-
shift(): string;
808-
slice(start?: number, end?: number): string[];
809-
sort(compareFn?: (a: string, b: string) => number): string[];
810-
splice(start: number): string[];
811-
splice(start: number, deleteCount: number, ...items: string[]): string[];
812-
unshift(...items: string[]): number;
813-
814-
indexOf(searchElement: string, fromIndex?: number): number;
815-
lastIndexOf(searchElement: string, fromIndex?: number): number;
816-
every(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
817-
some(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
818-
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
819-
map(callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): any[];
820-
filter(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): string[];
821-
reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
822-
reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
823801
}
824802

825-
826803
interface RegExp {
827804
/**
828805
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.

bin/lib.d.ts

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ interface String {
317317
* Matches a string with a regular expression, and returns an array containing the results of that search.
318318
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
319319
*/
320-
match(regexp: string): string[];
320+
match(regexp: string): RegExpMatchArray;
321321

322322
/**
323323
* Matches a string with a regular expression, and returns an array containing the results of that search.
324324
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
325325
*/
326-
match(regexp: RegExp): string[];
326+
match(regexp: RegExp): RegExpMatchArray;
327327

328328
/**
329329
* Replaces text in a string, using a regular expression or search string.
@@ -790,39 +790,16 @@ declare var Date: {
790790
now(): number;
791791
}
792792

793-
interface RegExpExecArray {
794-
[index: number]: string;
795-
length: number;
793+
interface RegExpMatchArray extends Array<string> {
794+
index?: number;
795+
input?: string;
796+
}
796797

798+
interface RegExpExecArray extends Array<string> {
797799
index: number;
798800
input: string;
799-
800-
toString(): string;
801-
toLocaleString(): string;
802-
concat(...items: string[][]): string[];
803-
join(separator?: string): string;
804-
pop(): string;
805-
push(...items: string[]): number;
806-
reverse(): string[];
807-
shift(): string;
808-
slice(start?: number, end?: number): string[];
809-
sort(compareFn?: (a: string, b: string) => number): string[];
810-
splice(start: number): string[];
811-
splice(start: number, deleteCount: number, ...items: string[]): string[];
812-
unshift(...items: string[]): number;
813-
814-
indexOf(searchElement: string, fromIndex?: number): number;
815-
lastIndexOf(searchElement: string, fromIndex?: number): number;
816-
every(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
817-
some(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;
818-
forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;
819-
map(callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): any[];
820-
filter(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): string[];
821-
reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
822-
reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;
823801
}
824802

825-
826803
interface RegExp {
827804
/**
828805
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.

0 commit comments

Comments
 (0)