From ba0601e16fcd5b49e3e0d8db43eec5870f7b26aa Mon Sep 17 00:00:00 2001 From: graphemecluster Date: Fri, 26 Aug 2022 01:28:46 +0800 Subject: [PATCH] lib Types and Documentations Fix --- src/lib/es2015.core.d.ts | 66 ++++++++----------- src/lib/es2015.symbol.wellknown.d.ts | 12 ++-- src/lib/es2020.symbol.wellknown.d.ts | 2 +- src/lib/es2021.string.d.ts | 26 ++++++-- src/lib/es5.d.ts | 49 +++++++------- src/lib/scripthost.d.ts | 6 +- .../completionsCommentsClass.baseline | 2 +- .../completionsCommentsClassMembers.baseline | 40 +++++------ ...completionsCommentsCommentParsing.baseline | 14 ++-- ...etionsCommentsFunctionDeclaration.baseline | 6 +- ...letionsCommentsFunctionExpression.baseline | 8 +-- .../completionsStringMethods.baseline | 30 ++++----- ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/destructuringTuple.errors.txt | 4 +- .../duplicateNumericIndexers.errors.txt | 4 +- .../reference/externModule.errors.txt | 8 +-- ...ithAsClauseAndLateBoundProperty.errors.txt | 2 +- ...wExceptionVariableInCatchClause.errors.txt | 2 +- .../narrowFromAnyWithInstanceof.errors.txt | 4 +- .../narrowFromAnyWithTypePredicate.errors.txt | 4 +- ...erAccessAfterPostfixExpression1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity1.errors.txt | 2 +- ...gularExpressionDivideAmbiguity2.errors.txt | 2 +- .../reference/parserS7.2_A1.5_T2.errors.txt | 4 +- .../reference/parserS7.3_A1.1_T2.errors.txt | 2 +- .../reference/parserS7.6_A4.2_T1.errors.txt | 20 +++--- .../reference/parserUnicode1.errors.txt | 4 +- .../reference/promisePermutations.errors.txt | 2 +- .../reference/promisePermutations2.errors.txt | 2 +- .../reference/promisePermutations3.errors.txt | 4 +- .../reference/redefineArray.errors.txt | 2 +- .../reference/scannerS7.2_A1.5_T2.errors.txt | 4 +- .../reference/scannerS7.3_A1.1_T2.errors.txt | 2 +- .../reference/scannerS7.6_A4.2_T1.errors.txt | 20 +++--- ...eStringsWithOverloadResolution1.errors.txt | 2 +- ...ingsWithOverloadResolution1_ES6.errors.txt | 2 +- ...ingsWithOverloadResolution3_ES6.errors.txt | 2 +- 37 files changed, 190 insertions(+), 179 deletions(-) diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index b42880c8ece82..6ff9574e71e5e 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 8911baa9bb9cf..9ace256f83576 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -219,22 +219,22 @@ interface String { match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; /** - * 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. + * Replaces one or more occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @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. + * Replaces one or more occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. * @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..a0390c1ba6d7f 100644 --- a/src/lib/es2021.string.d.ts +++ b/src/lib/es2021.string.d.ts @@ -1,15 +1,31 @@ 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. + * A `TypeError` will be thrown if a RegExp without a `g` (global) flag is used. + * @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. + * A `TypeError` will be thrown if a RegExp without a `g` (global) flag is used. + * @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; + + /** + * Replaces all occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @param replaceValue The replacement text. + */ + replaceAll(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; + + /** + * Replaces all occurrences of substrings that match the method provided by `searchValue`. + * @param searchValue An object that supports searching for and replacing matches within a string. + * @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 f4b499cd81691..27ec3a9edd80e 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -384,7 +384,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; @@ -410,42 +410,47 @@ 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. - * @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 one or more occurrences of substrings that match a search string or a regular expression. + * Only the first occurrence will be replaced unless a RegExp with a `g` (global) flag is used. + * @param searchValue A string or RegExp search value. + * @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. + * Only the first occurrence will be replaced unless a RegExp with a `g` (global) flag is used. + * @param searchValue A string or RegExp search value. * @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; @@ -457,9 +462,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; @@ -484,9 +489,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; @@ -505,7 +510,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; @@ -570,13 +575,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; } @@ -971,7 +976,7 @@ interface RegExp { // 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 5dce64b756ea7..a7a7e3545ffbc 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -3176,7 +3176,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 c09142c2a916f..4e48ea7911da3 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -4097,7 +4097,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" } ] @@ -11170,7 +11170,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" } ] @@ -15996,7 +15996,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" } ] @@ -23069,7 +23069,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" } ] @@ -27146,7 +27146,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" } ] @@ -32379,7 +32379,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" } ] @@ -36410,7 +36410,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" } ] @@ -41597,7 +41597,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" } ] @@ -46830,7 +46830,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" } ] @@ -52063,7 +52063,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" } ] @@ -57296,7 +57296,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" } ] @@ -61368,7 +61368,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" } ] @@ -65440,7 +65440,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" } ] @@ -69512,7 +69512,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" } ] @@ -73584,7 +73584,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" } ] @@ -77656,7 +77656,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" } ] @@ -81728,7 +81728,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" } ] @@ -86249,7 +86249,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" } ] @@ -91607,7 +91607,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" } ] @@ -96113,7 +96113,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 99a71cece8017..2354226b2c9ff 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -4931,7 +4931,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" } ] @@ -11159,7 +11159,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" } ] @@ -17023,7 +17023,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" } ] @@ -22688,7 +22688,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" } ] @@ -28479,7 +28479,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" } ] @@ -34707,7 +34707,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" } ] @@ -40600,7 +40600,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 4e3bcb801455d..256c7ab3254b7 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -3366,7 +3366,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" } ] @@ -7083,7 +7083,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" } ] @@ -11178,7 +11178,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 4fac96f0abb80..def966c4093ef 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -3083,7 +3083,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" } ] @@ -7578,7 +7578,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" } ] @@ -11521,7 +11521,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" } ] @@ -15800,7 +15800,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 0d3fe39d755c9..30f3cd57fecb5 100644 --- a/tests/baselines/reference/completionsStringMethods.baseline +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -181,7 +181,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" } ], @@ -753,7 +753,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.\r\nReturns a negative integer if it comes before, a positive number if it comes after, and 0 if they are equivalent.", "kind": "text" } ], @@ -770,7 +770,7 @@ "kind": "space" }, { - "text": "String to compare to target string", + "text": "The string to compare to.", "kind": "text" } ] @@ -883,7 +883,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\r\nconverted to a RegExp by using `new RegExp(regexp)`.", "kind": "text" } ] @@ -1031,7 +1031,7 @@ ], "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.\r\nOnly the first occurrence will be replaced unless a RegExp with a `g` (global) flag is used.", "kind": "text" } ], @@ -1048,7 +1048,7 @@ "kind": "space" }, { - "text": "A string to search for.", + "text": "A string or RegExp search value.", "kind": "text" } ] @@ -1065,7 +1065,7 @@ "kind": "space" }, { - "text": "A string containing the text to replace for every successful match of searchValue in this string.", + "text": "The replacement text.", "kind": "text" } ] @@ -1178,7 +1178,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\r\nconverted to a RegExp by using `new RegExp(regexp)`.", "kind": "text" } ] @@ -1307,7 +1307,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" } ] @@ -1324,7 +1324,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.\r\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.\r\nIf this value is not specified, the substring continues to the end of the string.", "kind": "text" } ] @@ -1598,7 +1598,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" } ], @@ -1615,7 +1615,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" } ] @@ -1632,7 +1632,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.\r\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.\r\nIf end is omitted, the characters from start through the end of the original string are returned.", "kind": "text" } ] @@ -2262,7 +2262,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" } ], @@ -2288,7 +2288,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/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index bb7aff5eb0fc0..c8f9fd6b305e7 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1490:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1495:13: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/destructuringTuple.errors.txt b/tests/baselines/reference/destructuringTuple.errors.txt index e8548783cafc4..20d9a290c04c9 100644 --- a/tests/baselines/reference/destructuringTuple.errors.txt +++ b/tests/baselines/reference/destructuringTuple.errors.txt @@ -33,8 +33,8 @@ tests/cases/compiler/destructuringTuple.ts(11,60): error TS2769: No overload mat !!! error TS2769: Overload 2 of 3, '(callbackfn: (previousValue: [], currentValue: number, currentIndex: number, array: number[]) => [], initialValue: []): []', gave the following error. !!! error TS2769: Type 'never[]' is not assignable to type '[]'. !!! error TS2769: Target allows only 0 element(s) but source may have more. -!!! related TS6502 /.ts/lib.es5.d.ts:1455:24: The expected type comes from the return type of this signature. -!!! related TS6502 /.ts/lib.es5.d.ts:1461:27: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1460:24: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1466:27: The expected type comes from the return type of this signature. ~~ !!! error TS2769: No overload matches this call. !!! error TS2769: Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt index b149e6f586d06..16ca0a32850d4 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(517,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(1476,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(522,5): error TS2374: Duplicate index signature for type 'number'. +lib.es5.d.ts(1481,5): error TS2374: Duplicate index signature for type 'number'. ==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (12 errors) ==== diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 134443d52d215..e56d130f926a2 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -66,20 +66,20 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat var d=new XDate(); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:937:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:942:13: 'Date' is declared here. d.getDay(); d=new XDate(1978,2); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:937:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:942:13: 'Date' is declared here. d.getXDate(); var n=XDate.parse("3/2/2004"); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:937:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:942:13: 'Date' is declared here. n=XDate.UTC(1964,2,1); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:937:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:942:13: 'Date' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index 5fb49e0dd99b6..d8a6111c8458b 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt @@ -7,5 +7,5 @@ tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error T tgt2 = src2; // Should error ~~~~ !!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: () => string; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (this: void, value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => IterableIterator<[number, number]>; keys: () => IterableIterator; values: () => IterableIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [iterator]: () => IterableIterator; [unscopables]: () => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }; }' but required in type 'number[]'. -!!! related TS2728 /.ts/lib.es5.d.ts:1299:5: 'length' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1304:5: 'length' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt index 3a07bb2f5d9b6..6eeddecfb1b68 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt @@ -24,7 +24,7 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17) err.massage; // ERROR: Property 'massage' does not exist on type 'Error' ~~~~~~~ !!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1049:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1054:5: 'message' is declared here. } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index 2206d1c9b214b..6c827e3261405 100644 --- a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt @@ -22,7 +22,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1049:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1054:5: 'message' is declared here. } if (x instanceof Date) { @@ -30,6 +30,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:783:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:788:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt index 109738a3f4bc8..94aa792a052b7 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:1049:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1054:5: 'message' is declared here. } if (isDate(x)) { @@ -49,6 +49,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:783:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:788:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index daab2dd65ec82..e061783a29989 100644 --- a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt +++ b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt @@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo !!! error TS1005: ';' expected. ~~~~~~~~ !!! error TS2552: Cannot find name 'toString'. Did you mean 'String'? -!!! related TS2728 /.ts/lib.es5.d.ts:530:13: 'String' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:535:13: 'String' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt index 252a08e5c3874..2d94ae168c2f6 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.errors.txt @@ -7,6 +7,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1045:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1050:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt index 3eb2b9824267c..589152746a27e 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity2.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre (1) /notregexp/a.foo(); ~~~~~~~~~ !!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'? -!!! related TS2728 /.ts/lib.es5.d.ts:1045:13: 'RegExp' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1050:13: 'RegExp' is declared here. ~ !!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index d89e7dbdbf68f..462082d4e4bd6 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index 1b259eccc99b7..26fe88430f8ab 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt index 3e7acb4d3f164..6b6cc78cfa1a5 100644 --- a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/parserUnicode1.errors.txt b/tests/baselines/reference/parserUnicode1.errors.txt index d2f7148f6f271..0f224db25e319 100644 --- a/tests/baselines/reference/parserUnicode1.errors.txt +++ b/tests/baselines/reference/parserUnicode1.errors.txt @@ -11,13 +11,13 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552 $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index c9862aec4ec6c..7bc65540d1aa4 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -447,7 +447,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2769: No overload m !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1535:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1540:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 17ac4d4aa3c72..000994163afbb 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of ~~~~~~~~~ !!! error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1535:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1540:5: 'catch' is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 835c3fcb71bcf..e0c7a897ed481 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -398,7 +398,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2769: The last overload gave the following error. !!! error TS2769: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2769: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1535:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1540:5: 'catch' is declared here. !!! related TS2771 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -445,5 +445,5 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2728 /.ts/lib.es5.d.ts:1535:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1540:5: 'catch' is declared here. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/redefineArray.errors.txt b/tests/baselines/reference/redefineArray.errors.txt index 0af9576082efa..468b3e9e823c2 100644 --- a/tests/baselines/reference/redefineArray.errors.txt +++ b/tests/baselines/reference/redefineArray.errors.txt @@ -5,4 +5,4 @@ tests/cases/compiler/redefineArray.ts(1,1): error TS2741: Property 'isArray' is Array = function (n:number, s:string) {return n;}; ~~~~~ !!! error TS2741: Property 'isArray' is missing in type '(n: number, s: string) => number' but required in type 'ArrayConstructor'. -!!! related TS2728 /.ts/lib.es5.d.ts:1486:5: 'isArray' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:1491:5: 'isArray' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index 535cc4b2f970f..35fa62b19fdd6 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index 40c4e573c779d..24fcaa0338f92 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt index ba258b4f255c3..e27597c7c66a8 100644 --- a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:1059:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1064:13: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index a9e6e98b25080..513fca3cb28b1 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:608:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:613:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index 6997efce9afd2..c3a8bc2347628 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -38,7 +38,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio ~~ !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. !!! error TS2345: Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. -!!! related TS2728 /.ts/lib.es5.d.ts:608:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:613:14: 'raw' is declared here. !!! related TS2793 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:5:10: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible. var b = foo([], 1); // string ~~ diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt index 13147855b73b1..e3ab20aedb65d 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt @@ -113,7 +113,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio fn5 `${ (n) => n.toFixed() }`; // will error; 'n' should have type 'string'. ~~~~~~~ !!! error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'? -!!! related TS2728 /.ts/lib.es2015.core.d.ts:485:5: 'fixed' is declared here. +!!! related TS2728 /.ts/lib.es2015.core.d.ts:477:5: 'fixed' is declared here. fn5 `${ (n) => n.substr(0) }`; \ No newline at end of file