mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-29 19:42:39 -05:00
lib: Fix documentation of String.replace first parameter.
The documentation incorrectly suggested that if the first parameter is a string, it is interpreted as a regular expression.
This commit is contained in:
4
src/lib/es5.d.ts
vendored
4
src/lib/es5.d.ts
vendored
@@ -341,14 +341,14 @@ interface String {
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @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.
|
||||
*/
|
||||
replace(searchValue: string, replaceValue: string): string;
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replacer A function that returns the replacement text.
|
||||
*/
|
||||
replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
|
||||
|
||||
Reference in New Issue
Block a user