mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 12:15:34 -06:00
Added overload for 'String#split' to take objects with '[Symbol.split]' method.
This commit is contained in:
parent
312df84934
commit
08f37cc2fa
7
src/lib/es6.d.ts
vendored
7
src/lib/es6.d.ts
vendored
@ -453,6 +453,13 @@ interface String {
|
||||
*/
|
||||
search(searcher: { [Symbol.search](string: string): number; }): number;
|
||||
|
||||
/**
|
||||
* Split a string into substrings using the specified separator and return them as an array.
|
||||
* @param splitter An object that can split a string.
|
||||
* @param limit A value used to limit the number of elements returned in the array.
|
||||
*/
|
||||
split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
|
||||
|
||||
/**
|
||||
* Returns an <a> HTML anchor element and sets the name attribute to the text value
|
||||
* @param name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user