| 14 | } |
| 15 | |
| 16 | interface String { |
| 17 | /** |
| 18 | * Split a string into substrings using the specified separator and return them as an array. |
| 19 | * @param splitter An object that can split a string. |
| 20 | * @param limit A value used to limit the number of elements returned in the array. |
| 21 | */ |
| 22 | split<T extends string | undefined = string | undefined>( |
| 23 | splitter: { [Symbol.split](string: string, limit?: number): string[] }, |
| 24 | limit?: number, |
| 25 | ): T[]; |
| 26 | split<T extends string | undefined = string | undefined>( |
| 27 | splitter: string, |
| 28 | limit?: number, |
| 29 | ): T[]; |
| 30 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…