Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/lib.es2015.symbol.wellknown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ interface String {
/**
* Replaces text in a string, using an object that supports replacement within a string.
* @param searchValue A object can search for and replace matches within a string.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
* @param replaceValue A string containing the text to replace for successful
* match of searchValue in this string. You can use regex g flag i.e.
* str.replace(/replace_word/g, 'replace_me') to replace all values and gi
* flag to replace all case-insensitive values.
*/
replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;

Expand Down
5 changes: 4 additions & 1 deletion src/lib/es2015.symbol.wellknown.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ interface String {
/**
* Replaces text in a string, using an object that supports replacement within a string.
* @param searchValue A object can search for and replace matches within a string.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
* @param replaceValue A string containing the text to replace for successful matches
* of the searchValue in this string (replaces either first occurrence
* of searchValue in case of using a string or every successful match
* in case a regex is used)
*/
replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;

Expand Down