Skip to content

Commit 1209df7

Browse files
committed
String.split accepts RegExp as delimiter
1 parent 67bcaf7 commit 1209df7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shared/JavaScript.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ interface String {
10971097
* @param delimiter Specifies the string to use for delimiting. If delimiter is omitted, the array returned contains one element, consisting of the entire string.
10981098
* @param limit
10991099
*/
1100-
split(delimiter: string, limit?: number): string[]
1100+
split(delimiter: string | RegExp, limit?: number): string[]
11011101

11021102
/**
11031103
* Returns a string consisting of this string enclosed in a <strike> tag.

0 commit comments

Comments
 (0)