From 4220ec8a9487a0854aea67ed0e0805cf8f97c690 Mon Sep 17 00:00:00 2001 From: Jujhar Singh Date: Tue, 3 Nov 2020 10:43:18 -0800 Subject: [PATCH 1/6] Fix IntelliSense doc string.replace typo --- lib/lib.es2015.symbol.wellknown.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lib.es2015.symbol.wellknown.d.ts b/lib/lib.es2015.symbol.wellknown.d.ts index d3a54c2dca08f..8a3abd16050e8 100644 --- a/lib/lib.es2015.symbol.wellknown.d.ts +++ b/lib/lib.es2015.symbol.wellknown.d.ts @@ -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; From 2f2107beb725dbf45e2eed3dd68d642b66f95739 Mon Sep 17 00:00:00 2001 From: Jujhar Singh Date: Sat, 7 Nov 2020 12:43:33 -0800 Subject: [PATCH 2/6] Update IntelliSense doc string.replace --- src/lib/es2015.symbol.wellknown.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index dce75ddab70c5..6c4a476aa0408 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -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 + * 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; From 5cd16d6c84e24b8511a38de4eb60d334e139e8ad Mon Sep 17 00:00:00 2001 From: Jujhar Singh Date: Tue, 17 Nov 2020 13:29:30 -0800 Subject: [PATCH 3/6] Update string.replace doc text --- src/lib/es2015.symbol.wellknown.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index 6c4a476aa0408..ee7d07368c06f 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -221,10 +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 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. + * @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; From 26affcb2c5e0d3591044d8fafe48e102e95ad840 Mon Sep 17 00:00:00 2001 From: Jujhar Singh Date: Thu, 19 Nov 2020 09:36:24 -0800 Subject: [PATCH 4/6] Revert "Fix IntelliSense doc string.replace typo" This reverts commit 4220ec8a9487a0854aea67ed0e0805cf8f97c690. --- lib/lib.es2015.symbol.wellknown.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/lib.es2015.symbol.wellknown.d.ts b/lib/lib.es2015.symbol.wellknown.d.ts index 8a3abd16050e8..d3a54c2dca08f 100644 --- a/lib/lib.es2015.symbol.wellknown.d.ts +++ b/lib/lib.es2015.symbol.wellknown.d.ts @@ -236,10 +236,7 @@ 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 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. + * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. */ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; From 12e3821d74edb8a4c41e7c37d18cef66b531d72c Mon Sep 17 00:00:00 2001 From: Jujhar Singh Date: Thu, 19 Nov 2020 10:03:14 -0800 Subject: [PATCH 5/6] Reworded string.replace doc text --- src/lib/es2015.symbol.wellknown.d.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index ee7d07368c06f..559513397259f 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -221,10 +221,9 @@ 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 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) + * @param replaceValue A string or function to be called for some or all matches containing + * the text to replace from successful matches of string or RegExp searchValue. If pattern is + * a string, only the first occurrence is replaced. */ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; From 5a2d8fdb263d73436a24120813017e3d3b2d9587 Mon Sep 17 00:00:00 2001 From: Jujhar Singh Date: Sun, 14 Mar 2021 16:49:49 -0700 Subject: [PATCH 6/6] Fix doc string.replace text --- src/lib/es2015.symbol.wellknown.d.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index 559513397259f..1e1b9682bbbc2 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -219,11 +219,9 @@ interface String { match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; /** - * 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 or function to be called for some or all matches containing - * the text to replace from successful matches of string or RegExp searchValue. If pattern is - * a string, only the first occurrence is replaced. + * Replaces first match with string or all matches with RegExp. + * @param searchValue A string or RegExp search value. + * @param replaceValue A string containing the text to replace for match. */ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;