Elide line:col info in "!!! related" errors when from default lib.d.ts files (#52330)

This commit is contained in:
Jake Bailey
2023-01-20 16:51:20 -08:00
committed by GitHub
parent 0c2fa391a8
commit 1447819df0
43 changed files with 80 additions and 76 deletions
+5 -1
View File
@@ -596,7 +596,11 @@ export namespace Compiler {
.map(s => "!!! " + ts.diagnosticCategoryName(error) + " TS" + error.code + ": " + s);
if (error.relatedInformation) {
for (const info of error.relatedInformation) {
errLines.push(`!!! related TS${info.code}${info.file ? " " + ts.formatLocation(info.file, info.start!, formatDiagnsoticHost, ts.identity) : ""}: ${ts.flattenDiagnosticMessageText(info.messageText, IO.newLine())}`);
let location = info.file ? " " + ts.formatLocation(info.file, info.start!, formatDiagnsoticHost, ts.identity) : "";
if (location && isDefaultLibraryFile(info.file!.fileName)) {
location = location.replace(/(lib(?:.*)\.d\.ts):\d+:\d+/i, "$1:--:--");
}
errLines.push(`!!! related TS${info.code}${location}: ${ts.flattenDiagnosticMessageText(info.messageText, IO.newLine())}`);
}
}
errLines.forEach(e => outputLines += (newLine() + e));
@@ -15,6 +15,6 @@ tests/cases/compiler/DateTimeFormatAndNumberFormatES2021.ts(5,25): error TS2551:
new Intl.NumberFormat().formatRangeToParts
~~~~~~~~~~~~~~~~~~
!!! error TS2551: Property 'formatRangeToParts' does not exist on type 'NumberFormat'. Did you mean 'formatToParts'?
!!! related TS2728 /.ts/lib.es2018.intl.d.ts:71:9: 'formatToParts' is declared here.
!!! related TS2728 /.ts/lib.es2018.intl.d.ts:--:--: 'formatToParts' is declared here.
new Intl.DateTimeFormat().formatRange
new Intl.DateTimeFormat().formatRangeToParts
@@ -16,7 +16,7 @@ tests/cases/conformance/async/es2017/asyncArrowFunction/asyncArrowFunction9_es20
!!! error TS1005: ',' expected.
~~~~~~~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:83:13: 'Promise' was also declared here.
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here.
~
!!! error TS1005: ',' expected.
~~
@@ -16,7 +16,7 @@ tests/cases/conformance/async/es5/asyncArrowFunction/asyncArrowFunction9_es5.ts(
!!! error TS1005: ',' expected.
~~~~~~~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:83:13: 'Promise' was also declared here.
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here.
~
!!! error TS1005: ',' expected.
~~
@@ -16,7 +16,7 @@ tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts(
!!! error TS1005: ',' expected.
~~~~~~~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:83:13: 'Promise' was also declared here.
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:--:--: 'Promise' was also declared here.
~
!!! error TS1005: ',' expected.
~~
@@ -21,7 +21,7 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'.
super(0, loc);
~~~
!!! error TS2552: Cannot find name 'loc'. Did you mean 'Lock'?
!!! related TS2728 /.ts/lib.dom.d.ts:9319:13: 'Lock' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:--:--: 'Lock' is declared here.
}
m() {
@@ -9,7 +9,7 @@ tests/cases/compiler/weird.js(9,17): error TS7006: Parameter 'error' implicitly
someFunction(function(BaseClass) {
~~~~~~~~~~~~
!!! error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'?
!!! related TS2728 /.ts/lib.es5.d.ts:321:13: 'Function' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Function' is declared here.
~~~~~~~~~
!!! error TS7006: Parameter 'BaseClass' implicitly has an 'any' type.
'use strict';
@@ -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:1498:13: 'Array' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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]]'.
@@ -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:1463:24: The expected type comes from the return type of this signature.
!!! related TS6502 /.ts/lib.es5.d.ts:1469:27: The expected type comes from the return type of this signature.
!!! related TS6502 /.ts/lib.es5.d.ts:--:--: The expected type comes from the return type of this signature.
!!! related TS6502 /.ts/lib.es5.d.ts:--:--: 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>[]): never[]', gave the following error.
@@ -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:184:5: 'getOwnPropertyNames' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'getOwnPropertyNames' is declared here.
@@ -53,22 +53,22 @@ tests/cases/conformance/es2020/es2020IntlAPIs.ts(50,29): error TS2345: Argument
new Intl.Locale(); // should error
~~~~~~~~~~~~~~~~~
!!! error TS2554: Expected 1-2 arguments, but got 0.
!!! related TS6210 /.ts/lib.es2020.intl.d.ts:336:14: An argument for 'tag' was not provided.
!!! related TS6210 /.ts/lib.es2020.intl.d.ts:--:--: An argument for 'tag' was not provided.
new Intl.Locale(new Intl.Locale('en-US'));
new Intl.DisplayNames(); // TypeError: invalid_argument
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2554: Expected 2 arguments, but got 0.
!!! related TS6210 /.ts/lib.es2020.intl.d.ts:415:13: An argument for 'locales' was not provided.
!!! related TS6210 /.ts/lib.es2020.intl.d.ts:--:--: An argument for 'locales' was not provided.
new Intl.DisplayNames('en'); // TypeError: invalid_argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2554: Expected 2 arguments, but got 1.
!!! related TS6210 /.ts/lib.es2020.intl.d.ts:415:39: An argument for 'options' was not provided.
!!! related TS6210 /.ts/lib.es2020.intl.d.ts:--:--: An argument for 'options' was not provided.
new Intl.DisplayNames('en', {}); // TypeError: invalid_argument
~~
!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'DisplayNamesOptions'.
!!! error TS2345: Property 'type' is missing in type '{}' but required in type 'DisplayNamesOptions'.
!!! related TS2728 /.ts/lib.es2020.intl.d.ts:358:9: 'type' is declared here.
!!! related TS2728 /.ts/lib.es2020.intl.d.ts:--:--: 'type' is declared here.
console.log((new Intl.DisplayNames(undefined, {type: 'language'})).of('en-GB')); // "British English"
const localesArg = ["es-ES", new Intl.Locale("en-US")];
@@ -12,10 +12,10 @@ tests/cases/compiler/extendArray.ts(7,32): error TS2552: Cannot find name '_elem
collect(fn:(e:_element) => _element[]) : any[];
~~~~~~~~
!!! error TS2552: Cannot find name '_element'. Did you mean 'Element'?
!!! related TS2728 /.ts/lib.dom.d.ts:5158:13: 'Element' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:--:--: 'Element' is declared here.
~~~~~~~~
!!! error TS2552: Cannot find name '_element'. Did you mean 'Element'?
!!! related TS2728 /.ts/lib.dom.d.ts:5158:13: 'Element' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:--:--: 'Element' is declared here.
}
}
@@ -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:941:13: 'Date' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:941:13: 'Date' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:941:13: 'Date' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:941:13: 'Date' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Date' is declared here.
@@ -10,7 +10,7 @@ tests/cases/compiler/intersectionsOfLargeUnions2.ts(31,15): error TS2536: Type '
interface ElementTagNameMap {
~~~~~~~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'ElementTagNameMap'.
!!! related TS6203 /.ts/lib.dom.d.ts:18059:6: 'ElementTagNameMap' was also declared here.
!!! related TS6203 /.ts/lib.dom.d.ts:--:--: 'ElementTagNameMap' was also declared here.
[index: number]: HTMLElement
}
@@ -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:321:13: 'Function' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Function' is declared here.
~
!!! error TS1005: ',' expected.
~
@@ -13,7 +13,7 @@ tests/cases/compiler/test.tsx(9,17): error TS2552: Cannot find name 'createEleme
return <div />;
~~~
!!! error TS2552: Cannot find name 'createElement'. Did you mean 'frameElement'?
!!! related TS2728 /.ts/lib.dom.d.ts:18082:13: 'frameElement' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:--:--: 'frameElement' is declared here.
}
}
@@ -13,6 +13,6 @@ tests/cases/compiler/test.tsx(9,17): error TS2552: Cannot find name 'MyElement'.
return <div />;
~~~
!!! error TS2552: Cannot find name 'MyElement'. Did you mean 'Element'?
!!! related TS2728 /.ts/lib.dom.d.ts:5158:13: 'Element' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:--:--: 'Element' is declared here.
}
}
@@ -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>[]): number[]; (...items: (number | ConcatArray<number>)[]): 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: { <S extends number>(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: <U>(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { <S extends number>(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; <U>(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; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { <S extends number>(predicate: (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<number>; values: () => IterableIterator<number>; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: <A, D extends number = 1>(this: A, depth?: D) => FlatArray<A, D>[]; [iterator]: () => IterableIterator<number>; [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:1307:5: 'length' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'length' is declared here.
@@ -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:1057:5: 'message' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'message' is declared here.
}
else {
@@ -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:1057:5: 'message' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:786:5: 'getHours' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'getHours' is declared here.
}
@@ -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:1057:5: 'message' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:786:5: 'getHours' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'getHours' is declared here.
}
@@ -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:533:13: 'String' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'String' is declared here.
@@ -352,7 +352,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T
!!! error TS2304: Cannot find name 'Type'.
~~~~~~~~~~~~~~~
!!! error TS2552: Cannot find name 'TypeDeclaration'. Did you mean 'CSSStyleDeclaration'?
!!! related TS2728 /.ts/lib.dom.d.ts:3440:13: 'CSSStyleDeclaration' is declared here.
!!! related TS2728 /.ts/lib.dom.d.ts:--:--: 'CSSStyleDeclaration' is declared here.
type.extendsTypeLinks = getBaseTypeLinks(typeDecl.extendsList, type.extendsTypeLinks);
type.implementsTypeLinks = getBaseTypeLinks(typeDecl.implementsList, type.implementsTypeLinks);
}
@@ -7,6 +7,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre
/notregexp/a.foo();
~~~~~~~~~
!!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'?
!!! related TS2728 /.ts/lib.es5.d.ts:1053:13: 'RegExp' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'RegExp' is declared here.
~
!!! error TS2304: Cannot find name 'a'.
@@ -6,6 +6,6 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpre
(1) /notregexp/a.foo();
~~~~~~~~~
!!! error TS2552: Cannot find name 'notregexp'. Did you mean 'RegExp'?
!!! related TS2728 /.ts/lib.es5.d.ts:1053:13: 'RegExp' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'RegExp' is declared here.
~
!!! error TS2304: Cannot find name 'a'.
@@ -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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Error' is declared here.
}
@@ -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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Error' is declared here.
}
@@ -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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Error' is declared here.
}
var \u041A = 1;
if (К !== 1) {
@@ -15,7 +15,7 @@ tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(3,1):
!!! error TS1005: ']' expected.
~~~~~~
!!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'?
!!! related TS2728 /.ts/lib.es2015.symbol.d.ts:48:13: 'Symbol' is declared here.
!!! related TS2728 /.ts/lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here.
~
!!! error TS1005: ',' expected.
~
@@ -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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Error' is declared here.
}
@@ -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<string>' is not assignable to parameter of type '(error: any) => Promise<number>'.
!!! error TS2769: Property 'catch' is missing in type 'IPromise<string>' but required in type 'Promise<number>'.
!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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
@@ -351,7 +351,7 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of
~~~~~~~~~
!!! error TS2345: Argument of type '(x: any) => IPromise<string>' is not assignable to parameter of type '(error: any) => Promise<number>'.
!!! error TS2345: Property 'catch' is missing in type 'IPromise<string>' but required in type 'Promise<number>'.
!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'catch' is declared here.
var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok
var r11: IPromise<number>;
@@ -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<string>' is not assignable to parameter of type '(error: any) => Promise<number>'.
!!! error TS2769: Property 'catch' is missing in type 'IPromise<string>' but required in type 'Promise<number>'.
!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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 '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<unknown>'.
!!! error TS2345: Property 'catch' is missing in type 'IPromise<any>' but required in type 'Promise<unknown>'.
!!! related TS2728 /.ts/lib.es5.d.ts:1538:5: 'catch' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'catch' is declared here.
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
@@ -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 '<T>(n: number, s: string) => number' but required in type 'ArrayConstructor'.
!!! related TS2728 /.ts/lib.es5.d.ts:1494:5: 'isArray' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'isArray' is declared here.
@@ -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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Error' is declared here.
}
@@ -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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Error' is declared here.
}
@@ -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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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:1067:13: 'Error' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: 'Error' is declared here.
}
var \u041A = 1;
if (К !== 1) {
@@ -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:611:14: 'raw' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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
~~
@@ -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:611:14: 'raw' is declared here.
!!! related TS2728 /.ts/lib.es5.d.ts:--:--: '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
~~
@@ -113,7 +113,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio
fn5 `${ (n) => n.toFixed() }`; // will error; 'n' should have type 'string'.
~~~~~~~
!!! error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'?
!!! related TS2728 /.ts/lib.es2015.core.d.ts:485:5: 'fixed' is declared here.
!!! related TS2728 /.ts/lib.es2015.core.d.ts:--:--: 'fixed' is declared here.
fn5 `${ (n) => n.substr(0) }`;
@@ -36,7 +36,7 @@ tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNot
let e = <BigGreeter ref={x => x.greeting.subtr(10)} />;
~~~~~
!!! error TS2551: Property 'subtr' does not exist on type 'string'. Did you mean 'substr'?
!!! related TS2728 /.lib/lib.d.ts:438:5: 'substr' is declared here.
!!! related TS2728 /.lib/lib.d.ts:--:--: 'substr' is declared here.
// Error (ref callback is contextually typed)
let f = <BigGreeter ref={x => x.notARealProperty} />;
~~~~~~~~~~~~~~~~
@@ -168,13 +168,13 @@ tests/cases/conformance/types/asyncGenerators/types.asyncGenerators.es2018.2.ts(
async function * explicitReturnType10(): IterableIterator<number> {
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncGenerator<number, any, undefined>' but required in type 'IterableIterator<number>'.
!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:55:5: '[Symbol.iterator]' is declared here.
!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:--:--: '[Symbol.iterator]' is declared here.
yield 1;
}
async function * explicitReturnType11(): Iterable<number> {
~~~~~~~~~~~~~~~~
!!! error TS2741: Property '[Symbol.iterator]' is missing in type 'AsyncGenerator<any, any, unknown>' but required in type 'Iterable<number>'.
!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:51:5: '[Symbol.iterator]' is declared here.
!!! related TS2728 /.ts/lib.es2015.iterable.d.ts:--:--: '[Symbol.iterator]' is declared here.
yield 1;
}
async function * explicitReturnType12(): Iterator<number> {
@@ -10,4 +10,4 @@ lib.es5.d.ts(35,18): error TS2300: Duplicate identifier 'eval'.
!!! error TS1100: Invalid use of 'eval' in strict mode.
~~~~
!!! error TS2300: Duplicate identifier 'eval'.
!!! related TS6203 /.ts/lib.es5.d.ts:35:18: 'eval' was also declared here.
!!! related TS6203 /.ts/lib.es5.d.ts:--:--: 'eval' was also declared here.