Skip to content

Commit 3d27f15

Browse files
authored
Merge pull request #146 from fartinmartin/split
[JavaScript] `String.split` accepts `RegExp` as delimiter
2 parents 67bcaf7 + 1209df7 commit 3d27f15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)