diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts
index 3b1c76c5afc3c..8c1e2e5089234 100644
--- a/src/lib/es2015.core.d.ts
+++ b/src/lib/es2015.core.d.ts
@@ -194,7 +194,7 @@ interface NumberConstructor {
/**
* The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
* that is representable as a Number value, which is approximately:
- * 2.2204460492503130808472633361816 x 10−16.
+ * 2.2204460492503130808472633361816E−16 (2^-52).
*/
readonly EPSILON: number;
@@ -229,14 +229,14 @@ interface NumberConstructor {
/**
* The value of the largest integer n such that n and n + 1 are both exactly representable as
* a Number value.
- * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 (2^53 − 1).
*/
readonly MAX_SAFE_INTEGER: number;
/**
* The value of the smallest integer n such that n and n − 1 are both exactly representable as
* a Number value.
- * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−2^53 + 1).
*/
readonly MIN_SAFE_INTEGER: number;
@@ -379,11 +379,11 @@ interface RegExpConstructor {
interface String {
/**
- * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
- * value of the UTF-16 encoded code point starting at the string element at position pos in
- * the String resulting from converting this object to a String.
- * If there is no element at that position, the result is undefined.
- * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
+ * Returns a non-negative integer less than 1114112 (0x110000) that is the code point value
+ * starting at the string element at the specified position.
+ * @param pos The zero-based index of the desired code point. If there is no character at the
+ * specified index, undefined is returned. If a UTF-16 surrogate pair does not begin at pos,
+ * the result is the code unit at pos.
*/
codePointAt(pos: number): number | undefined;
@@ -397,46 +397,38 @@ interface String {
includes(searchString: string, position?: number): boolean;
/**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * endPosition – length(this). Otherwise returns false.
+ * Determines whether the string ends with a substring, ending at the specified index.
+ * @param searchString The string to search for.
+ * @param endPosition The index at which to begin searching for. The default value is the
+ * length of searchString.
*/
endsWith(searchString: string, endPosition?: number): boolean;
/**
* Returns the String value result of normalizing the string into the normalization form
* named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
- * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
- * is "NFC"
+ * @param form The normalization form to be used. The default value is "NFC".
*/
- normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
-
- /**
- * Returns the String value result of normalizing the string into the normalization form
- * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
- * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
- * is "NFC"
- */
- normalize(form?: string): string;
+ normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
/**
* Returns a String value that is made from count copies appended together. If count is 0,
* the empty string is returned.
- * @param count number of copies to append
+ * @param count The number of copies to append
*/
repeat(count: number): string;
/**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * position. Otherwise returns false.
+ * Determines whether the string starts with a substring, beginning at the specified index.
+ * @param searchString The string to search for.
+ * @param position The index at which to begin searching for. The default value is 0.
*/
startsWith(searchString: string, position?: number): boolean;
/**
- * Returns an `` HTML anchor element and sets the name attribute to the text value
+ * Returns an `` HTML anchor element and sets the name attribute value
* @deprecated A legacy feature for browser compatibility
- * @param name
+ * @param name The name attribute value
*/
anchor(name: string): string;
@@ -467,20 +459,16 @@ interface String {
/**
* Returns a `` HTML element and sets the color attribute value
* @deprecated A legacy feature for browser compatibility
+ * @param color The color attribute value
*/
fontcolor(color: string): string;
/**
* Returns a `` HTML element and sets the size attribute value
* @deprecated A legacy feature for browser compatibility
+ * @param size The size attribute value
*/
- fontsize(size: number): string;
-
- /**
- * Returns a `` HTML element and sets the size attribute value
- * @deprecated A legacy feature for browser compatibility
- */
- fontsize(size: string): string;
+ fontsize(size: number | string): string;
/**
* Returns an `` HTML element
@@ -491,6 +479,7 @@ interface String {
/**
* Returns an `` HTML element and sets the href attribute value
* @deprecated A legacy feature for browser compatibility
+ * @param url The href attribute value
*/
link(url: string): string;
@@ -521,8 +510,9 @@ interface String {
interface StringConstructor {
/**
- * Return the String value whose elements are, in order, the elements in the List elements.
- * If length is 0, the empty string is returned.
+ * Returns a string created by a sequence of code points.
+ * If no arguments are given, the empty string is returned.
+ * @param codePoints A sequence of code points.
*/
fromCodePoint(...codePoints: number[]): string;
@@ -535,5 +525,5 @@ interface StringConstructor {
* @param template A well-formed template string call site representation.
* @param substitutions A set of substitution values.
*/
- raw(template: { raw: readonly string[] | ArrayLike}, ...substitutions: any[]): string;
+ raw(template: { raw: readonly string[] | ArrayLike }, ...substitutions: any[]): string;
}
diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts
index f27dc68850016..6c8def2edb0c4 100644
--- a/src/lib/es2015.symbol.wellknown.d.ts
+++ b/src/lib/es2015.symbol.wellknown.d.ts
@@ -219,22 +219,24 @@ interface String {
match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
/**
- * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.
+ * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}.
* @param searchValue An object that supports searching for and replacing matches within a string.
+ * This object is expected to implement its own replacement algorithm.
* @param replaceValue The replacement text.
*/
replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): 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.
+ * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}.
+ * @param searchValue An object that supports searching for and replacing matches within a string.
+ * This object is expected to implement its own replacement algorithm.
* @param replacer A function that returns the replacement text.
*/
replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
/**
* Finds the first substring match in a regular expression search.
- * @param searcher An object which supports searching within a string.
+ * @param searcher An object that supports searching within a string.
*/
search(searcher: { [Symbol.search](string: string): number; }): number;
diff --git a/src/lib/es2020.symbol.wellknown.d.ts b/src/lib/es2020.symbol.wellknown.d.ts
index 94a11768256c7..158ca3b83aa36 100644
--- a/src/lib/es2020.symbol.wellknown.d.ts
+++ b/src/lib/es2020.symbol.wellknown.d.ts
@@ -13,7 +13,7 @@ interface RegExp {
/**
* Matches a string with this regular expression, and returns an iterable of matches
* containing the results of that search.
- * @param string A string to search within.
+ * @param str A string to search within.
*/
[Symbol.matchAll](str: string): IterableIterator;
}
diff --git a/src/lib/es2021.string.d.ts b/src/lib/es2021.string.d.ts
index 66971bf84d6cf..8a0bce1b88149 100644
--- a/src/lib/es2021.string.d.ts
+++ b/src/lib/es2021.string.d.ts
@@ -1,15 +1,35 @@
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.
+ * Replaces all occurrences of substrings that match a search string or a regular expression.
+ * When the {@linkcode searchValue} is a `RegExp`, a `TypeError` will be thrown if the `g` (global) flag is not set
+ * (only those matches at the beginning are replaced if the `y` (sticky) flag is also present).
+ * @param searchValue A string or RegExp search value.
+ * @param replaceValue The replacement text.
*/
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.
+ * Replaces all occurrences of substrings that match a search string or a regular expression.
+ * When the {@linkcode searchValue} is a `RegExp`, a `TypeError` will be thrown if the `g` (global) flag is not set
+ * (only those matches at the beginning are replaced if the `y` (sticky) flag is also present).
+ * @param searchValue A string or RegExp search value.
* @param replacer A function that returns the replacement text.
*/
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}.
+ * @param searchValue An object that supports searching for and replacing matches within a string.
+ * This object is expected to implement its own replacement algorithm.
+ * @param replaceValue The replacement text.
+ */
+ replaceAll(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
+
+ /**
+ * Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}.
+ * @param searchValue An object that supports searching for and replacing matches within a string.
+ * This object is expected to implement its own replacement algorithm.
+ * @param replacer A function that returns the replacement text.
+ */
+ replaceAll(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
}
diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts
index a74b3cb4c2111..0d1c058cbe36e 100644
--- a/src/lib/es5.d.ts
+++ b/src/lib/es5.d.ts
@@ -387,7 +387,7 @@ interface String {
charAt(pos: number): string;
/**
- * Returns the Unicode value of the character at the specified location.
+ * Returns a non-negative integer less than 65536 (0x10000) that is the code unit value of the character at the specified index.
* @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
*/
charCodeAt(index: number): number;
@@ -413,42 +413,51 @@ interface String {
lastIndexOf(searchString: string, position?: number): number;
/**
- * Determines whether two strings are equivalent in the current locale.
- * @param that String to compare to target string
+ * Determines whether the reference string comes before, after or is equivalent to the specified string in the current locale.
+ * Returns a negative integer if it comes before, a positive number if it comes after, and 0 if they are equivalent.
+ * @param that The string to compare to.
*/
localeCompare(that: string): number;
/**
* Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ * @param regexp The regular expression for matching. If the provided value is not a RegExp, it is implicitly
+ * converted to a RegExp by using `new RegExp(regexp)`.
*/
match(regexp: string | RegExp): RegExpMatchArray | null;
/**
- * Replaces text in a string, using a regular expression or search string.
+ * Replaces one or more occurrences of substrings that match a search string or a regular expression.
+ * When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` (global) flag is set
+ * (or only those matches at the beginning, if the `y` (sticky) flag is also present).
+ * Otherwise, only the first match of {@linkcode searchValue} is replaced.
* @param searchValue A string or regular expression to search for.
- * @param replaceValue A string containing the text to replace. When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue} is replaced.
+ * @param replaceValue The replacement text.
*/
replace(searchValue: string | RegExp, replaceValue: string): string;
/**
- * Replaces text in a string, using a regular expression or search string.
- * @param searchValue A string to search for.
+ * Replaces one or more occurrences of substrings that match a search string or a regular expression.
+ * When the {@linkcode searchValue} is a `RegExp`, all matches are replaced if the `g` (global) flag is set
+ * (or only those matches at the beginning, if the `y` (sticky) flag is also present).
+ * Otherwise, only the first match of {@linkcode searchValue} is replaced.
+ * @param searchValue A string or regular expression to search for.
* @param replacer A function that returns the replacement text.
*/
replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
/**
* Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
+ * @param regexp The regular expression for matching. If the provided value is not a RegExp, it is implicitly
+ * converted to a RegExp by using `new RegExp(regexp)`.
*/
search(regexp: string | RegExp): number;
/**
* Returns a section of a string.
- * @param start The index to the beginning of the specified portion of stringObj.
- * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
- * If this value is not specified, the substring continues to the end of stringObj.
+ * @param start The index to the beginning of the specified portion of the string.
+ * @param end The index to the end of the specified portion of the string. The substring includes the characters up to, but not including, the character indicated by end.
+ * If this value is not specified, the substring continues to the end of the string.
*/
slice(start?: number, end?: number): string;
@@ -460,9 +469,9 @@ interface String {
split(separator: string | RegExp, limit?: number): string[];
/**
- * Returns the substring at the specified location within a String object.
- * @param start The zero-based index number indicating the beginning of the substring.
- * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
+ * Returns the substring beginning at the specified index within a String object.
+ * @param start The zero-based index indicating the beginning of the substring.
+ * @param end The zero-based index indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
* If end is omitted, the characters from start through the end of the original string are returned.
*/
substring(start: number, end?: number): string;
@@ -487,9 +496,9 @@ interface String {
// IE extensions
/**
- * Gets a substring beginning at the specified location and having the specified length.
+ * Gets a substring beginning at the specified index and having the specified length.
* @deprecated A legacy feature for browser compatibility
- * @param from The starting position of the desired substring. The index of the first character in the string is zero.
+ * @param from The starting index of the desired substring. The index of the first character in the string is zero.
* @param length The number of characters to include in the returned substring.
*/
substr(from: number, length?: number): string;
@@ -508,7 +517,7 @@ interface StringConstructor {
}
/**
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+ * Allows manipulation and formatting of text strings and determination of location of substrings within strings.
*/
declare var String: StringConstructor;
@@ -573,13 +582,13 @@ interface NumberConstructor {
/**
* A value that is less than the largest negative number that can be represented in JavaScript.
- * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ * JavaScript displays NEGATIVE_INFINITY values as -Infinity.
*/
readonly NEGATIVE_INFINITY: number;
/**
* A value greater than the largest number that can be represented in JavaScript.
- * JavaScript displays POSITIVE_INFINITY values as infinity.
+ * JavaScript displays POSITIVE_INFINITY values as Infinity.
*/
readonly POSITIVE_INFINITY: number;
}
@@ -975,11 +984,16 @@ interface RegExp {
/** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
readonly multiline: boolean;
+ /**
+ * Gets or sets the index at which the {@link RegExp.exec()} or {@link RegExp.test()} methods start searching for a match in an arbitrary string.
+ * After each execution of {@link RegExp.exec()} or {@link RegExp.test()}, `lastIndex` will be set to the end index of the matched string,
+ * or 0 if a match was not found.
+ */
lastIndex: number;
// Non-standard extensions
/** @deprecated A legacy feature for browser compatibility */
- compile(pattern: string, flags?: string): this;
+ compile(pattern: string, flags?: string): RegExp;
}
interface RegExpConstructor {
diff --git a/src/lib/scripthost.d.ts b/src/lib/scripthost.d.ts
index c3ac4a7e6560f..8dd04b3998770 100644
--- a/src/lib/scripthost.d.ts
+++ b/src/lib/scripthost.d.ts
@@ -175,7 +175,7 @@ declare var WScript: {
/**
* Creates a COM object.
- * @param strProgiID
+ * @param strProgID
* @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
*/
CreateObject(strProgID: string, strPrefix?: string): any;
@@ -277,9 +277,9 @@ interface VBArray {
ubound(dimension?: number): number;
/**
- * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
+ * Returns a JavaScript array with all the elements in the VBArray. If there are multiple dimensions,
* each successive dimension is appended to the end of the array.
- * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
+ * Example: [[1, 2, 3], [4, 5, 6]] becomes [1, 2, 3, 4, 5, 6]
*/
toArray(): T[];
}
diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline
index 9c84a387981c4..a952454d7aedc 100644
--- a/tests/baselines/reference/completionsCommentsClass.baseline
+++ b/tests/baselines/reference/completionsCommentsClass.baseline
@@ -3404,7 +3404,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline
index cf4807c1d83c6..46d19d19a8faa 100644
--- a/tests/baselines/reference/completionsCommentsClassMembers.baseline
+++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline
@@ -7444,7 +7444,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -14529,7 +14529,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -19367,7 +19367,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -26452,7 +26452,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -30541,7 +30541,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -35786,7 +35786,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -39829,7 +39829,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -45028,7 +45028,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -50273,7 +50273,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -55518,7 +55518,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -60763,7 +60763,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -64847,7 +64847,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -68931,7 +68931,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -73015,7 +73015,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -77099,7 +77099,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -81183,7 +81183,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -85267,7 +85267,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -89800,7 +89800,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -95170,7 +95170,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -99688,7 +99688,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline
index b7823ca0e0d46..780be629de68b 100644
--- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline
+++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline
@@ -6266,7 +6266,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -12506,7 +12506,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -18382,7 +18382,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -24059,7 +24059,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -29862,7 +29862,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -36102,7 +36102,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -42007,7 +42007,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline
index e8b72b51f629b..9bdfc8dabf2af 100644
--- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline
+++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline
@@ -3802,7 +3802,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -7531,7 +7531,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -11638,7 +11638,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline
index dbafae6e08da1..8aac838a478ae 100644
--- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline
+++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline
@@ -3693,7 +3693,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -8200,7 +8200,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -12155,7 +12155,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
@@ -16446,7 +16446,7 @@
],
"documentation": [
{
- "text": "Allows manipulation and formatting of text strings and determination and location of substrings within strings.",
+ "text": "Allows manipulation and formatting of text strings and determination of location of substrings within strings.",
"kind": "text"
}
]
diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline
index 0ef6b4203714d..9552e45dedf34 100644
--- a/tests/baselines/reference/completionsStringMethods.baseline
+++ b/tests/baselines/reference/completionsStringMethods.baseline
@@ -208,7 +208,7 @@
],
"documentation": [
{
- "text": "Returns the Unicode value of the character at the specified location.",
+ "text": "Returns a non-negative integer less than 65536 (0x10000) that is the code unit value of the character at the specified index.",
"kind": "text"
}
],
@@ -780,7 +780,7 @@
],
"documentation": [
{
- "text": "Determines whether two strings are equivalent in the current locale.",
+ "text": "Determines whether the reference string comes before, after or is equivalent to the specified string in the current locale.\nReturns a negative integer if it comes before, a positive number if it comes after, and 0 if they are equivalent.",
"kind": "text"
}
],
@@ -797,7 +797,7 @@
"kind": "space"
},
{
- "text": "String to compare to target string",
+ "text": "The string to compare to.",
"kind": "text"
}
]
@@ -910,7 +910,7 @@
"kind": "space"
},
{
- "text": "A variable name or string literal containing the regular expression pattern and flags.",
+ "text": "The regular expression for matching. If the provided value is not a RegExp, it is implicitly\nconverted to a RegExp by using `new RegExp(regexp)`.",
"kind": "text"
}
]
@@ -1058,7 +1058,53 @@
],
"documentation": [
{
- "text": "Replaces text in a string, using a regular expression or search string.",
+ "text": "Replaces one or more occurrences of substrings that match a search string or a regular expression.\nWhen the ",
+ "kind": "text"
+ },
+ {
+ "text": "{@linkcode ",
+ "kind": "link"
+ },
+ {
+ "text": "searchValue",
+ "kind": "linkName",
+ "target": {
+ "fileName": "lib.d.ts",
+ "textSpan": {
+ "start": 18865,
+ "length": 28
+ }
+ }
+ },
+ {
+ "text": "}",
+ "kind": "link"
+ },
+ {
+ "text": " is a `RegExp`, all matches are replaced if the `g` (global) flag is set\n(or only those matches at the beginning, if the `y` (sticky) flag is also present).\nOtherwise, only the first match of ",
+ "kind": "text"
+ },
+ {
+ "text": "{@linkcode ",
+ "kind": "link"
+ },
+ {
+ "text": "searchValue",
+ "kind": "linkName",
+ "target": {
+ "fileName": "lib.d.ts",
+ "textSpan": {
+ "start": 18865,
+ "length": 28
+ }
+ }
+ },
+ {
+ "text": "}",
+ "kind": "link"
+ },
+ {
+ "text": " is replaced.",
"kind": "text"
}
],
@@ -1092,53 +1138,7 @@
"kind": "space"
},
{
- "text": "A string containing the text to replace. When the ",
- "kind": "text"
- },
- {
- "text": "{@linkcode ",
- "kind": "link"
- },
- {
- "text": "searchValue",
- "kind": "linkName",
- "target": {
- "fileName": "lib.d.ts",
- "textSpan": {
- "start": 18529,
- "length": 28
- }
- }
- },
- {
- "text": "}",
- "kind": "link"
- },
- {
- "text": " is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of ",
- "kind": "text"
- },
- {
- "text": "{@linkcode ",
- "kind": "link"
- },
- {
- "text": "searchValue",
- "kind": "linkName",
- "target": {
- "fileName": "lib.d.ts",
- "textSpan": {
- "start": 18529,
- "length": 28
- }
- }
- },
- {
- "text": "}",
- "kind": "link"
- },
- {
- "text": " is replaced.",
+ "text": "The replacement text.",
"kind": "text"
}
]
@@ -1251,7 +1251,7 @@
"kind": "space"
},
{
- "text": "The regular expression pattern and applicable flags.",
+ "text": "The regular expression for matching. If the provided value is not a RegExp, it is implicitly\nconverted to a RegExp by using `new RegExp(regexp)`.",
"kind": "text"
}
]
@@ -1380,7 +1380,7 @@
"kind": "space"
},
{
- "text": "The index to the beginning of the specified portion of stringObj.",
+ "text": "The index to the beginning of the specified portion of the string.",
"kind": "text"
}
]
@@ -1397,7 +1397,7 @@
"kind": "space"
},
{
- "text": "The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\nIf this value is not specified, the substring continues to the end of stringObj.",
+ "text": "The index to the end of the specified portion of the string. The substring includes the characters up to, but not including, the character indicated by end.\nIf this value is not specified, the substring continues to the end of the string.",
"kind": "text"
}
]
@@ -1671,7 +1671,7 @@
],
"documentation": [
{
- "text": "Returns the substring at the specified location within a String object.",
+ "text": "Returns the substring beginning at the specified index within a String object.",
"kind": "text"
}
],
@@ -1688,7 +1688,7 @@
"kind": "space"
},
{
- "text": "The zero-based index number indicating the beginning of the substring.",
+ "text": "The zero-based index indicating the beginning of the substring.",
"kind": "text"
}
]
@@ -1705,7 +1705,7 @@
"kind": "space"
},
{
- "text": "Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\nIf end is omitted, the characters from start through the end of the original string are returned.",
+ "text": "The zero-based index indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\nIf end is omitted, the characters from start through the end of the original string are returned.",
"kind": "text"
}
]
@@ -2335,7 +2335,7 @@
],
"documentation": [
{
- "text": "Gets a substring beginning at the specified location and having the specified length.",
+ "text": "Gets a substring beginning at the specified index and having the specified length.",
"kind": "text"
}
],
@@ -2361,7 +2361,7 @@
"kind": "space"
},
{
- "text": "The starting position of the desired substring. The index of the first character in the string is zero.",
+ "text": "The starting index of the desired substring. The index of the first character in the string is zero.",
"kind": "text"
}
]
diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt
index 826a48d1c815b..8c3016223a9c2 100644
--- a/tests/baselines/reference/duplicateNumericIndexers.errors.txt
+++ b/tests/baselines/reference/duplicateNumericIndexers.errors.txt
@@ -10,8 +10,8 @@ tests/cases/conformance/types/members/duplicateNumericIndexers.ts(24,5): error T
tests/cases/conformance/types/members/duplicateNumericIndexers.ts(25,5): error TS2374: Duplicate index signature for type 'number'.
tests/cases/conformance/types/members/duplicateNumericIndexers.ts(29,5): error TS2374: Duplicate index signature for type 'number'.
tests/cases/conformance/types/members/duplicateNumericIndexers.ts(30,5): error TS2374: Duplicate index signature for type 'number'.
-lib.es5.d.ts(520,5): error TS2374: Duplicate index signature for type 'number'.
-lib.es5.d.ts(1484,5): error TS2374: Duplicate index signature for type 'number'.
+lib.es5.d.ts(529,5): error TS2374: Duplicate index signature for type 'number'.
+lib.es5.d.ts(1498,5): error TS2374: Duplicate index signature for type 'number'.
==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (12 errors) ====