TypeScript/src/lib/es2021.string.d.ts
Kagami Sascha Rosylight f4d0ea6539
Add target: ES2021 (#41239)
* Support `target: es2020`

* use CRLF

* update symbols

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2021-03-10 13:31:25 -08:00

16 lines
754 B
TypeScript

interface String {
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replacer A function that returns the replacement text.
*/
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
}