From d699bcdaae9d7138eb29612d410e628154a254b6 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Tue, 31 Aug 2021 02:38:07 +0900 Subject: [PATCH] Update lib types to mark Annex B as deprecated (#43710) * Mark properties defined in Annex B as deprecated * Tweak * Update baselines * Update fourslash tests * Add completionsStringMethods.ts test * Fix sortText value in fourslash test for deprecated tags * Update package-lock.json * Update package-lock.json * Mark Non-standard RegExp Constructor properties as deprecated * Update baselines Co-authored-by: TypeScript Bot --- src/harness/fourslashInterfaceImpl.ts | 18 +- src/lib/es2015.core.d.ts | 66 +- src/lib/es2019.string.d.ts | 10 +- src/lib/es5.d.ts | 32 + .../completionsCommentsClass.baseline | 26 +- .../completionsCommentsClassMembers.baseline | 520 +++- ...completionsCommentsCommentParsing.baseline | 182 +- ...etionsCommentsFunctionDeclaration.baseline | 78 +- ...letionsCommentsFunctionExpression.baseline | 104 +- .../completionsStringMethods.baseline | 2317 +++++++++++++++++ ...tructuringParameterDeclaration4.errors.txt | 2 +- .../reference/destructuringTuple.errors.txt | 4 +- .../duplicateNumericIndexers.errors.txt | 4 +- ...errorMessageOnObjectLiteralType.errors.txt | 2 +- .../reference/externModule.errors.txt | 8 +- .../reference/invalidTypeOfTarget.errors.txt | 2 +- ...ithAsClauseAndLateBoundProperty.errors.txt | 2 +- ...wExceptionVariableInCatchClause.errors.txt | 2 +- .../narrowFromAnyWithInstanceof.errors.txt | 4 +- .../narrowFromAnyWithTypePredicate.errors.txt | 4 +- ...peHidingMembersOfExtendedObject.errors.txt | 14 +- ...tringIndexerHidingObjectIndexer.errors.txt | 14 +- ...erAccessAfterPostfixExpression1.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 +- .../fourslash/completionAfterGlobalThis.ts | 7 +- ...tionListAfterRegularExpressionLiteral01.ts | 2 +- ...etionListAfterRegularExpressionLiteral1.ts | 2 +- .../completionListAfterStringLiteral1.ts | 2 +- .../fourslash/completionsStringMethods.ts | 5 + .../fourslash/getJavaScriptCompletions18.ts | 2 +- .../fourslash/getJavaScriptCompletions19.ts | 2 +- .../fourslash/getJavaScriptQuickInfo8.ts | 2 +- tests/cases/fourslash/javaScriptClass1.ts | 2 +- tests/cases/fourslash/javaScriptClass4.ts | 2 +- tests/cases/fourslash/javaScriptPrototype1.ts | 4 +- .../fourslash/jsDocFunctionSignatures3.ts | 2 +- 49 files changed, 3285 insertions(+), 238 deletions(-) create mode 100644 tests/baselines/reference/completionsStringMethods.baseline create mode 100644 tests/cases/fourslash/completionsStringMethods.ts diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 5b4a3fe30aaef..7479d2258c43d 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -971,6 +971,12 @@ namespace FourSlashInterface { kindModifiers: "declare", sortText: SortText.GlobalsOrKeywords }); + const deprecatedFunctionEntry = (name: string): ExpectedCompletionEntryObject => ({ + name, + kind: "function", + kindModifiers: "deprecated,declare", + sortText: SortText.DeprecatedGlobalsOrKeywords + }); const varEntry = (name: string): ExpectedCompletionEntryObject => ({ name, kind: "var", @@ -994,6 +1000,12 @@ namespace FourSlashInterface { kindModifiers: "declare", sortText: SortText.LocationPriority }); + const deprecatedMethodEntry = (name: string): ExpectedCompletionEntryObject => ({ + name, + kind: "method", + kindModifiers: "deprecated,declare", + sortText: SortText.DeprecatedLocationPriority + }); const propertyEntry = (name: string): ExpectedCompletionEntryObject => ({ name, kind: "property", @@ -1227,7 +1239,7 @@ namespace FourSlashInterface { methodEntry("toLocaleUpperCase"), methodEntry("trim"), propertyEntry("length"), - methodEntry("substr"), + deprecatedMethodEntry("substr"), methodEntry("valueOf"), ]; @@ -1331,8 +1343,8 @@ namespace FourSlashInterface { functionEntry("decodeURIComponent"), functionEntry("encodeURI"), functionEntry("encodeURIComponent"), - functionEntry("escape"), - functionEntry("unescape"), + deprecatedFunctionEntry("escape"), + deprecatedFunctionEntry("unescape"), varEntry("NaN"), varEntry("Infinity"), varEntry("Object"), diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index c39c6fa6f92bd..8026b39455a17 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -435,47 +435,87 @@ interface String { /** * Returns an `` HTML anchor element and sets the name attribute to the text value + * @deprecated A legacy feature for browser compatibility * @param name */ anchor(name: string): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ big(): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ blink(): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ bold(): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ fixed(): string; - /** Returns a `` HTML element and sets the color attribute value */ + /** + * Returns a `` HTML element and sets the color attribute value + * @deprecated A legacy feature for browser compatibility + */ fontcolor(color: string): string; - /** Returns a `` HTML element and sets the size attribute value */ + /** + * Returns a `` HTML element and sets the size attribute value + * @deprecated A legacy feature for browser compatibility + */ fontsize(size: number): string; - /** Returns a `` HTML element and sets the size attribute value */ + /** + * Returns a `` HTML element and sets the size attribute value + * @deprecated A legacy feature for browser compatibility + */ fontsize(size: string): string; - /** Returns an `` HTML element */ + /** + * Returns an `` HTML element + * @deprecated A legacy feature for browser compatibility + */ italics(): string; - /** Returns an `` HTML element and sets the href attribute value */ + /** + * Returns an `` HTML element and sets the href attribute value + * @deprecated A legacy feature for browser compatibility + */ link(url: string): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ small(): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ strike(): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ sub(): string; - /** Returns a `` HTML element */ + /** + * Returns a `` HTML element + * @deprecated A legacy feature for browser compatibility + */ sup(): string; } diff --git a/src/lib/es2019.string.d.ts b/src/lib/es2019.string.d.ts index b83472b11ab1c..3da54c0061590 100644 --- a/src/lib/es2019.string.d.ts +++ b/src/lib/es2019.string.d.ts @@ -5,9 +5,15 @@ interface String { /** Removes the leading white space and line terminator characters from a string. */ trimStart(): string; - /** Removes the leading white space and line terminator characters from a string. */ + /** + * Removes the leading white space and line terminator characters from a string. + * @deprecated A legacy feature for browser compatibility. Use `trimStart` instead + */ trimLeft(): string; - /** Removes the trailing white space and line terminator characters from a string. */ + /** + * Removes the trailing white space and line terminator characters from a string. + * @deprecated A legacy feature for browser compatibility. Use `trimEnd` instead + */ trimRight(): string; } diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 8fae5230d23db..f485a39996ee3 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -64,12 +64,14 @@ declare function encodeURIComponent(uriComponent: string | number | boolean): st /** * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence. + * @deprecated A legacy feature for browser compatibility * @param string A string value */ declare function escape(string: string): string; /** * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. + * @deprecated A legacy feature for browser compatibility * @param string A string value */ declare function unescape(string: string): string; @@ -483,6 +485,7 @@ interface String { // IE extensions /** * Gets a substring beginning at the specified location 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 length The number of characters to include in the returned substring. */ @@ -924,6 +927,7 @@ interface RegExp { lastIndex: number; // Non-standard extensions + /** @deprecated A legacy feature for browser compatibility */ compile(): this; } @@ -935,16 +939,44 @@ interface RegExpConstructor { readonly prototype: RegExp; // Non-standard extensions + /** @deprecated A legacy feature for browser compatibility */ $1: string; + /** @deprecated A legacy feature for browser compatibility */ $2: string; + /** @deprecated A legacy feature for browser compatibility */ $3: string; + /** @deprecated A legacy feature for browser compatibility */ $4: string; + /** @deprecated A legacy feature for browser compatibility */ $5: string; + /** @deprecated A legacy feature for browser compatibility */ $6: string; + /** @deprecated A legacy feature for browser compatibility */ $7: string; + /** @deprecated A legacy feature for browser compatibility */ $8: string; + /** @deprecated A legacy feature for browser compatibility */ $9: string; + /** @deprecated A legacy feature for browser compatibility */ + input: string; + /** @deprecated A legacy feature for browser compatibility */ + $_: string; + /** @deprecated A legacy feature for browser compatibility */ lastMatch: string; + /** @deprecated A legacy feature for browser compatibility */ + "$&": string; + /** @deprecated A legacy feature for browser compatibility */ + lastParen: string; + /** @deprecated A legacy feature for browser compatibility */ + "$+": string; + /** @deprecated A legacy feature for browser compatibility */ + leftContext: string; + /** @deprecated A legacy feature for browser compatibility */ + "$`": string; + /** @deprecated A legacy feature for browser compatibility */ + rightContext: string; + /** @deprecated A legacy feature for browser compatibility */ + "$'": string; } declare var RegExp: RegExpConstructor; diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline index 433e5723ab7c6..1285092cc1f07 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -840,8 +840,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -899,6 +899,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -921,8 +930,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -980,6 +989,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline index b698ccd9eba5b..d9fdda9493a03 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -1679,8 +1679,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -1738,6 +1738,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -1760,8 +1769,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -1819,6 +1828,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -8717,8 +8735,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -8776,6 +8794,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -8798,8 +8825,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -8857,6 +8884,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -13511,8 +13547,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -13570,6 +13606,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -13592,8 +13637,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -13651,6 +13696,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -20549,8 +20603,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -20608,6 +20662,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -20630,8 +20693,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -20689,6 +20752,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -24595,8 +24667,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -24654,6 +24726,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -24676,8 +24757,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -24735,6 +24816,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -29796,8 +29886,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -29855,6 +29945,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -29877,8 +29976,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -29936,6 +30035,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -33796,8 +33904,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -33855,6 +33963,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -33877,8 +33994,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -33936,6 +34053,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -38951,8 +39077,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -39010,6 +39136,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -39032,8 +39167,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -39091,6 +39226,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -44152,8 +44296,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -44211,6 +44355,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -44233,8 +44386,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -44292,6 +44445,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -49353,8 +49515,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -49412,6 +49574,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -49434,8 +49605,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -49493,6 +49664,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -54554,8 +54734,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -54613,6 +54793,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -54635,8 +54824,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -54694,6 +54883,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -58595,8 +58793,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -58654,6 +58852,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -58676,8 +58883,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -58735,6 +58942,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -62636,8 +62852,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -62695,6 +62911,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -62717,8 +62942,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -62776,6 +63001,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -66677,8 +66911,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -66736,6 +66970,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -66758,8 +67001,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -66817,6 +67060,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -70718,8 +70970,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -70777,6 +71029,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -70799,8 +71060,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -70858,6 +71119,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -74759,8 +75029,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -74818,6 +75088,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -74840,8 +75119,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -74899,6 +75178,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -78800,8 +79088,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -78859,6 +79147,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -78881,8 +79178,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -78940,6 +79237,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -83142,8 +83448,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -83201,6 +83507,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -83223,8 +83538,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -83282,6 +83597,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -88435,8 +88759,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -88494,6 +88818,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -88516,8 +88849,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -88575,6 +88908,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -93088,8 +93430,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -93147,6 +93489,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -93169,8 +93520,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -93228,6 +93579,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline index 54f07bd3a8b6b..50779f72e866d 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -1015,8 +1015,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -1074,6 +1074,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -1096,8 +1105,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -1155,6 +1164,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -6473,8 +6491,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -6532,6 +6550,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -6554,8 +6581,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -6613,6 +6640,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -13045,8 +13081,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -13104,6 +13140,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -13126,8 +13171,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -13185,6 +13230,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -18499,8 +18553,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -18558,6 +18612,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -18580,8 +18643,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -18639,6 +18702,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -24439,8 +24511,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -24498,6 +24570,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -24520,8 +24601,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -24579,6 +24660,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -29897,8 +29987,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -29956,6 +30046,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -29978,8 +30077,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -30037,6 +30136,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -36318,8 +36426,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -36377,6 +36485,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -36399,8 +36516,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -36458,6 +36575,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline index bed64c419c426..87283cb4e0c3e 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -844,8 +844,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -903,6 +903,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -925,8 +934,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -984,6 +993,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -5269,8 +5287,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -5328,6 +5346,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -5350,8 +5377,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -5409,6 +5436,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -8594,8 +8630,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -8653,6 +8689,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -8675,8 +8720,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -8734,6 +8779,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline index f228f1f5f0a40..b5ea10ef6f795 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -936,8 +936,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -995,6 +995,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -1017,8 +1026,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -1076,6 +1085,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -4661,8 +4679,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -4720,6 +4738,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -4742,8 +4769,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -4801,6 +4828,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -9492,8 +9528,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -9551,6 +9587,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -9573,8 +9618,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -9632,6 +9677,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -13001,8 +13055,8 @@ { "name": "escape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -13060,6 +13114,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ @@ -13082,8 +13145,8 @@ { "name": "unescape", "kind": "function", - "kindModifiers": "declare", - "sortText": "15", + "kindModifiers": "deprecated,declare", + "sortText": "23", "displayParts": [ { "text": "function", @@ -13141,6 +13204,15 @@ } ], "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, { "name": "param", "text": [ diff --git a/tests/baselines/reference/completionsStringMethods.baseline b/tests/baselines/reference/completionsStringMethods.baseline new file mode 100644 index 0000000000000..f9caf9cd86a72 --- /dev/null +++ b/tests/baselines/reference/completionsStringMethods.baseline @@ -0,0 +1,2317 @@ +[ + { + "marker": { + "fileName": "/tests/cases/fourslash/completionsStringMethods.ts", + "position": 14, + "name": "1" + }, + "completionList": { + "isGlobalCompletion": false, + "isMemberCompletion": true, + "isNewIdentifierLocation": false, + "entries": [ + { + "name": "toString", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "toString", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns a string representation of a string.", + "kind": "text" + } + ] + }, + { + "name": "charAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "charAt", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "pos", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns the character at the specified index.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "pos", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The zero-based index of the desired character.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "charCodeAt", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "charCodeAt", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "index", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns the Unicode value of the character at the specified location.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "index", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "concat", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "concat", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "...", + "kind": "punctuation" + }, + { + "text": "strings", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns a string that contains the concatenation of two or more strings.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "strings", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The strings to append to the end of the string.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "indexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "indexOf", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "searchString", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "position", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns the position of the first occurrence of a substring.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "searchString", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The substring to search for in the string", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "position", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "lastIndexOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "lastIndexOf", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "searchString", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "position", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns the last occurrence of a substring in the string.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "searchString", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The substring to search for.", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "position", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The index at which to begin searching. If omitted, the search begins at the end of the string.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "localeCompare", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "localeCompare", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "that", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "+", + "kind": "operator" + }, + { + "text": "1", + "kind": "numericLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "overload", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + } + ], + "documentation": [ + { + "text": "Determines whether two strings are equivalent in the current locale.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "that", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String to compare to target string", + "kind": "text" + } + ] + } + ] + }, + { + "name": "match", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "match", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "regexp", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "RegExp", + "kind": "localName" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "RegExpMatchArray", + "kind": "interfaceName" + } + ], + "documentation": [ + { + "text": "Matches a string with a regular expression, and returns an array containing the results of that search.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "regexp", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A variable name or string literal containing the regular expression pattern and flags.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "replace", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "replace", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "searchValue", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "RegExp", + "kind": "localName" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "replaceValue", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "+", + "kind": "operator" + }, + { + "text": "1", + "kind": "numericLiteral" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "overload", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + } + ], + "documentation": [ + { + "text": "Replaces text in a string, using a regular expression or search string.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "searchValue", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A string to search for.", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "replaceValue", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A string containing the text to replace for every successful match of searchValue in this string.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "search", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "search", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "regexp", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "RegExp", + "kind": "localName" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Finds the first substring match in a regular expression search.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "regexp", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The regular expression pattern and applicable flags.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "slice", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "slice", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "start", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "end", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns a section of a string.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "start", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The index to the beginning of the specified portion of stringObj.", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "end", + "kind": "parameterName" + }, + { + "text": " ", + "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.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "split", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "split", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "separator", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "RegExp", + "kind": "localName" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "limit", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + } + ], + "documentation": [ + { + "text": "Split a string into substrings using the specified separator and return them as an array.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "separator", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "limit", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "A value used to limit the number of elements returned in the array.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "substring", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "substring", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "start", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "end", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns the substring at the specified location within a String object.", + "kind": "text" + } + ], + "tags": [ + { + "name": "param", + "text": [ + { + "text": "start", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The zero-based index number indicating the beginning of the substring.", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "end", + "kind": "parameterName" + }, + { + "text": " ", + "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.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "toLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "toLowerCase", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Converts all the alphabetic characters in a string to lowercase.", + "kind": "text" + } + ] + }, + { + "name": "toLocaleLowerCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "toLocaleLowerCase", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "locales", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.", + "kind": "text" + } + ] + }, + { + "name": "toUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "toUpperCase", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Converts all the alphabetic characters in a string to uppercase.", + "kind": "text" + } + ] + }, + { + "name": "toLocaleUpperCase", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "toLocaleUpperCase", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "locales", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": "[", + "kind": "punctuation" + }, + { + "text": "]", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.", + "kind": "text" + } + ] + }, + { + "name": "trim", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "trim", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Removes the leading and trailing white space and line terminator characters from a string.", + "kind": "text" + } + ] + }, + { + "name": "length", + "kind": "property", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "property", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "length", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns the length of a String object.", + "kind": "text" + } + ] + }, + { + "name": "substr", + "kind": "method", + "kindModifiers": "deprecated,declare", + "sortText": "19", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "substr", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "from", + "kind": "parameterName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ",", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "length", + "kind": "parameterName" + }, + { + "text": "?", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "number", + "kind": "keyword" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Gets a substring beginning at the specified location and having the specified length.", + "kind": "text" + } + ], + "tags": [ + { + "name": "deprecated", + "text": [ + { + "text": "A legacy feature for browser compatibility", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "from", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The starting position of the desired substring. The index of the first character in the string is zero.", + "kind": "text" + } + ] + }, + { + "name": "param", + "text": [ + { + "text": "length", + "kind": "parameterName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "The number of characters to include in the returned substring.", + "kind": "text" + } + ] + } + ] + }, + { + "name": "valueOf", + "kind": "method", + "kindModifiers": "declare", + "sortText": "11", + "displayParts": [ + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "method", + "kind": "text" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "String", + "kind": "localName" + }, + { + "text": ".", + "kind": "punctuation" + }, + { + "text": "valueOf", + "kind": "methodName" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": ")", + "kind": "punctuation" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + } + ], + "documentation": [ + { + "text": "Returns the primitive value of the specified object.", + "kind": "text" + } + ] + } + ] + } + } +] \ No newline at end of file diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index e7e55ca0e1a5d..cc8a0a61196d9 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:1415:13: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1447: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 7b9785db0f198..3b074480a865b 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:1380:24: The expected type comes from the return type of this signature. -!!! related TS6502 /.ts/lib.es5.d.ts:1386:27: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1412:24: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1418: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 435a26293573c..a0558284060de 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(514,5): error TS2374: Duplicate index signature for type 'number'. -lib.es5.d.ts(1401,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(1433,5): error TS2374: Duplicate index signature for type 'number'. ==== tests/cases/conformance/types/members/duplicateNumericIndexers.ts (12 errors) ==== diff --git a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt index fc6b1e8aa18cc..8a5c1b069c593 100644 --- a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt +++ b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt @@ -13,4 +13,4 @@ tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2551: Prop Object.getOwnPropertyNamess(null); ~~~~~~~~~~~~~~~~~~~~ !!! error TS2551: Property 'getOwnPropertyNamess' does not exist on type 'ObjectConstructor'. Did you mean 'getOwnPropertyNames'? -!!! related TS2728 /.ts/lib.es5.d.ts:179:5: 'getOwnPropertyNames' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:181:5: 'getOwnPropertyNames' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 438db5d0e77bb..afcc73a1c26f3 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:907:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:910: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:907:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:910: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:907:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:910: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:907:13: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:910:13: 'Date' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/invalidTypeOfTarget.errors.txt b/tests/baselines/reference/invalidTypeOfTarget.errors.txt index c57838334f944..db87a34095213 100644 --- a/tests/baselines/reference/invalidTypeOfTarget.errors.txt +++ b/tests/baselines/reference/invalidTypeOfTarget.errors.txt @@ -36,7 +36,7 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/invalidTypeOfTarget.ts var x7: typeof function f() { }; ~~~~~~~~ !!! error TS2552: Cannot find name 'function'. Did you mean 'Function'? -!!! related TS2728 /.ts/lib.es5.d.ts:316:13: 'Function' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:318:13: 'Function' is declared here. ~ !!! error TS1005: ',' expected. ~ diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index 5775ef42eddb1..f443baac49c4b 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:1224:5: 'length' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1256: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 c5a85483631f2..ce0410aece272 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:974:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1006:5: 'message' is declared here. } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index 6e7ae406bcfa0..6661db76c5e03 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:974:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1006: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:763:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:766: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 274c0bcbe1373..56cf384f28ac0 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:974:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1006: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:763:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:766:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt index 60ba9fa57667a..04c780f9e635f 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts(10,5): error TS2411: Property 'data' of type 'A' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(122,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(125,5): error TS2411: Property 'toString' of type '() => string' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(128,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(131,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(137,5): error TS2411: Property 'hasOwnProperty' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(143,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(149,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(124,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(127,5): error TS2411: Property 'toString' of type '() => string' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(130,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(133,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(139,5): error TS2411: Property 'hasOwnProperty' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(145,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(151,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. ==== tests/cases/conformance/types/members/objectTypeHidingMembersOfExtendedObject.ts (1 errors) ==== diff --git a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt index 54c1fd57aa2d4..b049b6b9ad64a 100644 --- a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt +++ b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt @@ -1,10 +1,10 @@ -lib.es5.d.ts(122,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(125,5): error TS2411: Property 'toString' of type '() => string' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(128,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(131,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(137,5): error TS2411: Property 'hasOwnProperty' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(143,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to 'string' index type 'Object'. -lib.es5.d.ts(149,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(124,5): error TS2411: Property 'constructor' of type 'Function' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(127,5): error TS2411: Property 'toString' of type '() => string' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(130,5): error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(133,5): error TS2411: Property 'valueOf' of type '() => Object' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(139,5): error TS2411: Property 'hasOwnProperty' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(145,5): error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to 'string' index type 'Object'. +lib.es5.d.ts(151,5): error TS2411: Property 'propertyIsEnumerable' of type '(v: PropertyKey) => boolean' is not assignable to 'string' index type 'Object'. ==== tests/cases/conformance/types/members/objectTypeWithStringIndexerHidingObjectIndexer.ts (0 errors) ==== diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index 2d5b8277e9848..daab2dd65ec82 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:527:13: 'String' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:530:13: 'String' is declared here. \ 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 e699649181895..5634185a0a5d3 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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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 72a6b13b60828..7a853ce7d164f 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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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 38fb5e321d2d6..b40fe10b5ac66 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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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 4bcc26a643418..5b5c079b5f07a 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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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 bcceb3790cc37..6d804846c3e72 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:1460:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1492: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 053bc3c1a8751..36d5ada335abe 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:1460:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1492: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 3303c1e3a094b..c5089759822ba 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:1460:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1492: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:1460:5: 'catch' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1492: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 55390de55ae7b..2173143e72563 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:1411:5: 'isArray' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:1443: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 575b38c483288..e7e7d66bb0eb3 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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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 63c080074f099..0eb5cb3182219 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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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 382c345b12c3f..66fcc455b095c 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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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:984:13: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1016: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 df28829239178..a9e6e98b25080 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:605:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:608: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 c6bb16548b693..6997efce9afd2 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:605:14: 'raw' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:608: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 2ae0c9f6f7552..13147855b73b1 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:472:5: 'fixed' is declared here. +!!! related TS2728 /.ts/lib.es2015.core.d.ts:485:5: 'fixed' is declared here. fn5 `${ (n) => n.substr(0) }`; \ No newline at end of file diff --git a/tests/cases/fourslash/completionAfterGlobalThis.ts b/tests/cases/fourslash/completionAfterGlobalThis.ts index bda57b9e0bd08..eac8db8ef4700 100644 --- a/tests/cases/fourslash/completionAfterGlobalThis.ts +++ b/tests/cases/fourslash/completionAfterGlobalThis.ts @@ -8,5 +8,10 @@ verify.completions({ completion.globalThisEntry, ...completion.globalsVars, completion.undefinedVarEntry - ].map(e => ({ ...e, sortText: completion.SortText.LocationPriority })) + ].map(e => { + if (e.sortText === completion.SortText.DeprecatedGlobalsOrKeywords) { + return { ...e, sortText: completion.SortText.DeprecatedLocationPriority }; + } + return { ...e, sortText: completion.SortText.LocationPriority }; + }) }); diff --git a/tests/cases/fourslash/completionListAfterRegularExpressionLiteral01.ts b/tests/cases/fourslash/completionListAfterRegularExpressionLiteral01.ts index 8572229531a9b..efd93663f70b1 100644 --- a/tests/cases/fourslash/completionListAfterRegularExpressionLiteral01.ts +++ b/tests/cases/fourslash/completionListAfterRegularExpressionLiteral01.ts @@ -3,4 +3,4 @@ ////let v = 100; /////a/./**/ -verify.completions({ marker: "", exact: ["exec", "test", "source", "global", "ignoreCase", "multiline", "lastIndex", "compile"] }); +verify.completions({ marker: "", exact: ["exec", "test", "source", "global", "ignoreCase", "multiline", "lastIndex", { name: "compile", sortText: completion.SortText.DeprecatedLocationPriority }] }); diff --git a/tests/cases/fourslash/completionListAfterRegularExpressionLiteral1.ts b/tests/cases/fourslash/completionListAfterRegularExpressionLiteral1.ts index 22fdf36adbbf8..01e44c1abddda 100644 --- a/tests/cases/fourslash/completionListAfterRegularExpressionLiteral1.ts +++ b/tests/cases/fourslash/completionListAfterRegularExpressionLiteral1.ts @@ -2,4 +2,4 @@ /////a/./**/ -verify.completions({ marker: "", exact: ["exec", "test", "source", "global", "ignoreCase", "multiline", "lastIndex", "compile"] }); +verify.completions({ marker: "", exact: ["exec", "test", "source", "global", "ignoreCase", "multiline", "lastIndex", { name: "compile", sortText: completion.SortText.DeprecatedLocationPriority }] }); diff --git a/tests/cases/fourslash/completionListAfterStringLiteral1.ts b/tests/cases/fourslash/completionListAfterStringLiteral1.ts index 9837f8a628c00..252af8cb6c186 100644 --- a/tests/cases/fourslash/completionListAfterStringLiteral1.ts +++ b/tests/cases/fourslash/completionListAfterStringLiteral1.ts @@ -6,6 +6,6 @@ verify.completions({ marker: "", exact: [ "toString", "charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "localeCompare", "match", "replace", "search", "slice", - "split", "substring", "toLowerCase", "toLocaleLowerCase", "toUpperCase", "toLocaleUpperCase", "trim", "length", "substr", "valueOf", + "split", "substring", "toLowerCase", "toLocaleLowerCase", "toUpperCase", "toLocaleUpperCase", "trim", "length", { name: "substr", sortText: completion.SortText.DeprecatedLocationPriority }, "valueOf", ], }); diff --git a/tests/cases/fourslash/completionsStringMethods.ts b/tests/cases/fourslash/completionsStringMethods.ts new file mode 100644 index 0000000000000..d65ad7dee34f5 --- /dev/null +++ b/tests/cases/fourslash/completionsStringMethods.ts @@ -0,0 +1,5 @@ +/// + +//// var s = "foo"./*1*/ + +verify.baselineCompletions() diff --git a/tests/cases/fourslash/getJavaScriptCompletions18.ts b/tests/cases/fourslash/getJavaScriptCompletions18.ts index efe0e7513d926..2190076dc0e42 100644 --- a/tests/cases/fourslash/getJavaScriptCompletions18.ts +++ b/tests/cases/fourslash/getJavaScriptCompletions18.ts @@ -17,4 +17,4 @@ verify.completions({ includes: { name: "toFixed", kind: "method", kindModifiers: goTo.marker('b'); edit.insert('.'); -verify.completions({ includes: { name: "substr", kind: "method", kindModifiers: "declare" } }); +verify.completions({ includes: { name: "substring", kind: "method", kindModifiers: "declare" } }); diff --git a/tests/cases/fourslash/getJavaScriptCompletions19.ts b/tests/cases/fourslash/getJavaScriptCompletions19.ts index 54624eb3e4cc9..f3689b0e5eac8 100644 --- a/tests/cases/fourslash/getJavaScriptCompletions19.ts +++ b/tests/cases/fourslash/getJavaScriptCompletions19.ts @@ -18,7 +18,7 @@ goTo.marker('str'); edit.insert('.'); -verify.completions({ includes: { name: "substr", kind: "method", kindModifiers: "declare" } }); +verify.completions({ includes: { name: "substring", kind: "method", kindModifiers: "declare" } }); goTo.marker('num'); edit.insert('.'); diff --git a/tests/cases/fourslash/getJavaScriptQuickInfo8.ts b/tests/cases/fourslash/getJavaScriptQuickInfo8.ts index 76a4ea64a9b2d..02d27a563e77f 100644 --- a/tests/cases/fourslash/getJavaScriptQuickInfo8.ts +++ b/tests/cases/fourslash/getJavaScriptQuickInfo8.ts @@ -26,4 +26,4 @@ edit.backspace(); goTo.marker('2'); edit.insert('.'); -verify.completions({ includes: { name: "substr", kind: "method", kindModifiers: "declare" } }); +verify.completions({ includes: { name: "substring", kind: "method", kindModifiers: "declare" } }); diff --git a/tests/cases/fourslash/javaScriptClass1.ts b/tests/cases/fourslash/javaScriptClass1.ts index ec3bc3b5ea66a..d083486959256 100644 --- a/tests/cases/fourslash/javaScriptClass1.ts +++ b/tests/cases/fourslash/javaScriptClass1.ts @@ -30,7 +30,7 @@ verify.completions({ }); edit.insert('bar.'); -verify.completions({ includes: ["substr"] }); +verify.completions({ includes: ["substring"] }); edit.backspace('bar.'.length); edit.insert('union.'); diff --git a/tests/cases/fourslash/javaScriptClass4.ts b/tests/cases/fourslash/javaScriptClass4.ts index 5b66c1e290963..1475943f086b1 100644 --- a/tests/cases/fourslash/javaScriptClass4.ts +++ b/tests/cases/fourslash/javaScriptClass4.ts @@ -18,4 +18,4 @@ goTo.marker(); edit.insert('.baz.'); -verify.completions({ includes: { name: "substr", kind: "method", kindModifiers: "declare" } }); +verify.completions({ includes: { name: "substring", kind: "method", kindModifiers: "declare" } }); diff --git a/tests/cases/fourslash/javaScriptPrototype1.ts b/tests/cases/fourslash/javaScriptPrototype1.ts index 983af3fe9f812..44810cb83df2e 100644 --- a/tests/cases/fourslash/javaScriptPrototype1.ts +++ b/tests/cases/fourslash/javaScriptPrototype1.ts @@ -34,10 +34,10 @@ edit.backspace(); // Members of the invocation of a class method (1) goTo.marker('3'); edit.insert('.'); -verify.completions({ includes: "toFixed", excludes: "substr" }); +verify.completions({ includes: "toFixed", excludes: "substring" }); edit.backspace(); // Members of the invocation of a class method (2) goTo.marker('4'); edit.insert('.'); -verify.completions({ includes: "substr", excludes: "toFixed" }); +verify.completions({ includes: "substring", excludes: "toFixed" }); diff --git a/tests/cases/fourslash/jsDocFunctionSignatures3.ts b/tests/cases/fourslash/jsDocFunctionSignatures3.ts index 443c482e65e55..7b4a94bf54ff1 100644 --- a/tests/cases/fourslash/jsDocFunctionSignatures3.ts +++ b/tests/cases/fourslash/jsDocFunctionSignatures3.ts @@ -23,7 +23,7 @@ goTo.marker('1'); edit.insert('.'); -verify.completions({ includes: { name: "substr", kind: "method", kindModifiers: "declare" } }); +verify.completions({ includes: { name: "substring", kind: "method", kindModifiers: "declare" } }); edit.backspace(); goTo.marker('2');