From 69803d4d3c6e7751959e75d2430131542d39af16 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 4 Sep 2014 13:36:32 -0700 Subject: [PATCH 01/79] Implemented getOccurrences for for/for-in/while/do-while loops and their breaks/continues. This includes labelled break/continue. --- src/services/services.ts | 112 ++++++++++++++++++++++++++++++++++----- 1 file changed, 98 insertions(+), 14 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index c8e73f657a..b0b4c21f43 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1296,6 +1296,16 @@ module ts { (node.parent).label === node; } + function isLabelledBy(node: Node, labelName: string) { + for (var owner = node.parent; owner && owner.kind === SyntaxKind.LabelledStatement; owner = owner.parent) { + if ((owner).label.text === labelName) { + return true; + } + } + + return false; + } + function isLabelName(node: Node): boolean { return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); } @@ -2181,8 +2191,20 @@ module ts { } break; case SyntaxKind.BreakKeyword: - if (hasKind(node.parent, SyntaxKind.BreakStatement)) { - return getBreakStatementOccurences(node.parent); + case SyntaxKind.ContinueKeyword: + if (hasKind(node.parent, SyntaxKind.BreakStatement) || hasKind(node.parent, SyntaxKind.ContinueStatement)) { + return getBreakOrContinueStatementOccurences(node.parent); + } + break; + case SyntaxKind.ForKeyword: + if (hasKind(node.parent, SyntaxKind.ForStatement) || hasKind(node.parent, SyntaxKind.ForInStatement)) { + return getLoopBreakContinueOccurrences(node.parent); + } + break; + case SyntaxKind.WhileKeyword: + case SyntaxKind.DoKeyword: + if (hasKind(node.parent, SyntaxKind.WhileStatement) || hasKind(node.parent, SyntaxKind.DoStatement)) { + return getLoopBreakContinueOccurrences(node.parent); } break; } @@ -2281,6 +2303,66 @@ module ts { return map(keywords, getReferenceEntryFromNode); } + function getLoopBreakContinueOccurrences(loopNode: IterationStatement): ReferenceEntry[] { + var keywords: Node[] = []; + + if (pushKeywordIf(keywords, loopNode.getFirstToken(), SyntaxKind.ForKeyword, SyntaxKind.WhileKeyword, SyntaxKind.DoKeyword)) { + // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. + if (loopNode.kind === SyntaxKind.DoStatement) { + var loopTokens = loopNode.getChildren(); + + for (var i = loopTokens.length - 1; i >= 0; i--) { + if (pushKeywordIf(keywords, loopTokens[i], SyntaxKind.WhileKeyword)) { + break; + } + } + } + } + + // This switch tracks whether or not we're traversing into a construct that takes + // ownership over unlabelled 'break'/'continue' statements. + var onlyCheckLabelled = false; + + forEachChild(loopNode.statement, function aggregateBreakContinues(node: Node) { + // This tracks the status of the flag before diving into the next node. + var lastOnlyCheckLabelled = onlyCheckLabelled; + + switch (node.kind) { + case SyntaxKind.BreakStatement: + case SyntaxKind.ContinueStatement: + // If the 'break'/'continue' statement has a label, it must be one of our tracked labels. + if ((node).label) { + var labelName = (node).label.text; + if (isLabelledBy(loopNode, labelName)) { + pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); + } + } + // If not, we are free to add it if we haven't lost ownership of unlabeled break/continue statements. + else if (!onlyCheckLabelled) { + pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); + } + break; + + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.SwitchStatement: + onlyCheckLabelled = true; + // Fall through + default: + // Do not cross function boundaries. + if (!isAnyFunction(node)) { + forEachChild(node, aggregateBreakContinues); + } + } + // Restore the last state. + onlyCheckLabelled = lastOnlyCheckLabelled; + }); + + return map(keywords, keywordToReferenceEntry); + } + function getSwitchCaseDefaultOccurrences(switchStatement: SwitchStatement) { var keywords: Node[] = []; @@ -2317,28 +2399,30 @@ module ts { return map(keywords, getReferenceEntryFromNode); } - function getBreakStatementOccurences(breakStatement: BreakOrContinueStatement): ReferenceEntry[]{ - // TODO (drosen): Deal with labeled statements. - if (breakStatement.label) { - return undefined; - } - + function getBreakOrContinueStatementOccurences(breakOrContinueStatement: BreakOrContinueStatement): ReferenceEntry[]{ for (var owner = node.parent; owner; owner = owner.parent) { switch (owner.kind) { case SyntaxKind.ForStatement: case SyntaxKind.ForInStatement: case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: - // TODO (drosen): Handle loops! - return undefined; - + // The iteration statement is the owner if the break/continue statement is either unlabeled, + // or if the break/continue statement's label corresponds to one of the loop's labels. + if (!breakOrContinueStatement.label || isLabelledBy(owner, breakOrContinueStatement.label.text)) { + return getLoopBreakContinueOccurrences(owner) + } + break; case SyntaxKind.SwitchStatement: - return getSwitchCaseDefaultOccurrences(owner); - + // A switch statement can only be the owner of an unlabeled break statement. + if (breakOrContinueStatement.kind === SyntaxKind.BreakStatement && !breakOrContinueStatement.label) { + return getSwitchCaseDefaultOccurrences(owner); + } + break; default: if (isAnyFunction(owner)) { return undefined; } + break; } } @@ -2347,7 +2431,7 @@ module ts { // returns true if 'node' is defined and has a matching 'kind'. function hasKind(node: Node, kind: SyntaxKind) { - return !!(node && node.kind === kind); + return node !== undefined && node.kind === kind; } // Null-propagating 'parent' function. From 90dd3276359eb8cd747a1978f02cf4599a2e3ed3 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 5 Sep 2014 10:59:20 -0700 Subject: [PATCH 02/79] Changed logic for break/continue search in switch statements and loops. Now if a labeled break in a switch refers to its original switch statement, we also highlight the 'switch' keyword. Also added tests for loop/break/continue. --- src/services/services.ts | 105 ++++++++++++------ .../getOccurrencesLoopBreakContinue.ts | 77 +++++++++++++ .../getOccurrencesLoopBreakContinue2.ts | 77 +++++++++++++ .../getOccurrencesLoopBreakContinue3.ts | 77 +++++++++++++ .../getOccurrencesLoopBreakContinue4.ts | 77 +++++++++++++ .../getOccurrencesLoopBreakContinue5.ts | 77 +++++++++++++ ...etOccurrencesLoopBreakContinueNegatives.ts | 70 ++++++++++++ .../getOccurrencesSwitchCaseDefault2.ts | 13 ++- .../getOccurrencesSwitchCaseDefault3.ts | 25 +++++ 9 files changed, 561 insertions(+), 37 deletions(-) create mode 100644 tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts create mode 100644 tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts create mode 100644 tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts create mode 100644 tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts create mode 100644 tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts create mode 100644 tests/cases/fourslash/getOccurrencesLoopBreakContinueNegatives.ts create mode 100644 tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts diff --git a/src/services/services.ts b/src/services/services.ts index b0b4c21f43..3ef524c82e 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1359,11 +1359,19 @@ module ts { } enum SearchMeaning { + None = 0x0, Value = 0x1, Type = 0x2, Namespace = 0x4 } + enum BreakContinueSearchType { + None = 0x0, + Unlabeled = 0x1, + Labeled = 0x2, + All = Unlabeled | Labeled + } + // A cache of completion entries for keywords, these do not change between sessions var keywordCompletions:CompletionEntry[] = []; for (var i = SyntaxKind.FirstKeyword; i <= SyntaxKind.LastKeyword; i++) { @@ -2318,49 +2326,45 @@ module ts { } } } + + // These track whether we can own unlabeled break/continues. + var breakSearchType = BreakContinueSearchType.All; + var continueSearchType = BreakContinueSearchType.All; - // This switch tracks whether or not we're traversing into a construct that takes - // ownership over unlabelled 'break'/'continue' statements. - var onlyCheckLabelled = false; - - forEachChild(loopNode.statement, function aggregateBreakContinues(node: Node) { - // This tracks the status of the flag before diving into the next node. - var lastOnlyCheckLabelled = onlyCheckLabelled; + (function aggregateBreakContinues(node: Node) { + // Remember the statuses of the flags before diving into the next node. + var prevBreakSearchType = breakSearchType; + var prevContinueSearchType = continueSearchType; switch (node.kind) { case SyntaxKind.BreakStatement: case SyntaxKind.ContinueStatement: - // If the 'break'/'continue' statement has a label, it must be one of our tracked labels. - if ((node).label) { - var labelName = (node).label.text; - if (isLabelledBy(loopNode, labelName)) { - pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); - } - } - // If not, we are free to add it if we haven't lost ownership of unlabeled break/continue statements. - else if (!onlyCheckLabelled) { + if (ownsBreakOrContinue(loopNode, node, breakSearchType, continueSearchType)) { pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); } break; - + case SyntaxKind.ForStatement: case SyntaxKind.ForInStatement: case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: - case SyntaxKind.SwitchStatement: - onlyCheckLabelled = true; + continueSearchType = BreakContinueSearchType.Labeled; // Fall through - default: - // Do not cross function boundaries. - if (!isAnyFunction(node)) { - forEachChild(node, aggregateBreakContinues); - } + case SyntaxKind.SwitchStatement: + breakSearchType = BreakContinueSearchType.Labeled; } - // Restore the last state. - onlyCheckLabelled = lastOnlyCheckLabelled; - }); - return map(keywords, keywordToReferenceEntry); + // Do not cross function boundaries. + if (!isAnyFunction(node)) { + forEachChild(node, aggregateBreakContinues); + } + + // Restore the last state. + breakSearchType = prevBreakSearchType; + continueSearchType = prevContinueSearchType; + })(loopNode.statement); + + return map(keywords, getReferenceEntryFromNode); } function getSwitchCaseDefaultOccurrences(switchStatement: SwitchStatement) { @@ -2368,38 +2372,50 @@ module ts { pushKeywordIf(keywords, switchStatement.getFirstToken(), SyntaxKind.SwitchKeyword); - // Go through each clause in the switch statement, collecting the clause keywords. + // Types of break statements we can grab on to. + var breakSearchType = BreakContinueSearchType.All; + + // Go through each clause in the switch statement, collecting the case/default keywords. forEach(switchStatement.clauses, clause => { pushKeywordIf(keywords, clause.getFirstToken(), SyntaxKind.CaseKeyword, SyntaxKind.DefaultKeyword); // For each clause, also recursively traverse the statements where we can find analogous breaks. forEachChild(clause, function aggregateBreakKeywords(node: Node): void { + // Back the old search value up. + var oldBreakSearchType = breakSearchType; + switch (node.kind) { case SyntaxKind.BreakStatement: // If the break statement has a label, it cannot be part of a switch block. - if (!(node).label) { + if (ownsBreakOrContinue(switchStatement, + node, + breakSearchType, + /*continuesSearchType*/ BreakContinueSearchType.None)) { pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.BreakKeyword); } - // Fall through + break; case SyntaxKind.ForStatement: case SyntaxKind.ForInStatement: case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: case SyntaxKind.SwitchStatement: - return; + breakSearchType = BreakContinueSearchType.Labeled; } // Do not cross function boundaries. if (!isAnyFunction(node)) { forEachChild(node, aggregateBreakKeywords); } + + // Restore the last state. + breakSearchType = oldBreakSearchType; }); }); return map(keywords, getReferenceEntryFromNode); } - function getBreakOrContinueStatementOccurences(breakOrContinueStatement: BreakOrContinueStatement): ReferenceEntry[]{ + function getBreakOrContinueStatementOccurences(breakOrContinueStatement: BreakOrContinueStatement): ReferenceEntry[] { for (var owner = node.parent; owner; owner = owner.parent) { switch (owner.kind) { case SyntaxKind.ForStatement: @@ -2413,8 +2429,8 @@ module ts { } break; case SyntaxKind.SwitchStatement: - // A switch statement can only be the owner of an unlabeled break statement. - if (breakOrContinueStatement.kind === SyntaxKind.BreakStatement && !breakOrContinueStatement.label) { + // A switch statement can only be the owner of an break statement. + if (breakOrContinueStatement.kind === SyntaxKind.BreakStatement && (!breakOrContinueStatement.label || isLabelledBy(owner, breakOrContinueStatement.label.text))) { return getSwitchCaseDefaultOccurrences(owner); } break; @@ -2429,6 +2445,25 @@ module ts { return undefined; } + // Note: 'statement' must be a descendant of 'root'. + // Reasonable logic for restricting traversal prior to arriving at the + // 'statement' node is beyond the scope of this function. + function ownsBreakOrContinue(root: Node, + statement: BreakOrContinueStatement, + breakSearchType: BreakContinueSearchType, + continueSearchType: BreakContinueSearchType): boolean { + var searchType = statement.kind === SyntaxKind.BreakStatement ? + breakSearchType : + continueSearchType; + + if (statement.label) { + return isLabelledBy(root, statement.label.text); + } + else { + return !!(searchType & BreakContinueSearchType.Unlabeled); + } + } + // returns true if 'node' is defined and has a matching 'kind'. function hasKind(node: Node, kind: SyntaxKind) { return node !== undefined && node.kind === kind; diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts new file mode 100644 index 0000000000..aad909f973 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts @@ -0,0 +1,77 @@ +/// + +////var arr = [1, 2, 3, 4]; +////label1: [|for|] (var n in arr) { +//// [|break|]; +//// [|continue|]; +//// [|br/**/eak|] label1; +//// [|continue|] label1; +//// +//// label2: for (var i = 0; i < arr[n]; i++) { +//// [|break|] label1; +//// [|continue|] label1; +//// +//// break; +//// continue; +//// break label2; +//// continue label2; +//// +//// function foo() { +//// label3: while (true) { +//// break; +//// continue; +//// break label3; +//// continue label3; +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// +//// label4: do { +//// break; +//// continue; +//// break label4; +//// continue label4; +//// +//// break label3; +//// continue label3; +//// +//// switch (10) { +//// case 1: +//// case 2: +//// break; +//// break label4; +//// default: +//// continue; +//// } +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// () => { break; } +//// } while (true) +//// } +//// } +//// } +////} +//// +////label5: while (true) break label5; +//// +////label7: while (true) continue label5; + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts new file mode 100644 index 0000000000..cae9845e06 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts @@ -0,0 +1,77 @@ +/// + +////var arr = [1, 2, 3, 4]; +////label1: for (var n in arr) { +//// break; +//// continue; +//// break label1; +//// continue label1; +//// +//// label2: [|f/**/or|] (var i = 0; i < arr[n]; i++) { +//// break label1; +//// continue label1; +//// +//// [|break|]; +//// [|continue|]; +//// [|break|] label2; +//// [|continue|] label2; +//// +//// function foo() { +//// label3: while (true) { +//// break; +//// continue; +//// break label3; +//// continue label3; +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// +//// label4: do { +//// break; +//// continue; +//// break label4; +//// continue label4; +//// +//// break label3; +//// continue label3; +//// +//// switch (10) { +//// case 1: +//// case 2: +//// break; +//// break label4; +//// default: +//// continue; +//// } +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// () => { break; +//// } while (true) +//// } +//// } +//// } +////} +//// +////label5: while (true) break label5; +//// +////label7: while (true) continue label5; + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts new file mode 100644 index 0000000000..571114ea15 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts @@ -0,0 +1,77 @@ +/// + +////var arr = [1, 2, 3, 4]; +////label1: for (var n in arr) { +//// break; +//// continue; +//// break label1; +//// continue label1; +//// +//// label2: for (var i = 0; i < arr[n]; i++) { +//// break label1; +//// continue label1; +//// +//// break; +//// continue; +//// break label2; +//// continue label2; +//// +//// function foo() { +//// label3: [|w/**/hile|] (true) { +//// [|break|]; +//// [|continue|]; +//// [|break|] label3; +//// [|continue|] label3; +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// +//// label4: do { +//// break; +//// continue; +//// break label4; +//// continue label4; +//// +//// [|break|] label3; +//// [|continue|] label3; +//// +//// switch (10) { +//// case 1: +//// case 2: +//// break; +//// break label4; +//// default: +//// continue; +//// } +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// () => { break; } +//// } while (true) +//// } +//// } +//// } +////} +//// +////label5: while (true) break label5; +//// +////label7: while (true) continue label5; + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts new file mode 100644 index 0000000000..587fb1a093 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts @@ -0,0 +1,77 @@ +/// + +////var arr = [1, 2, 3, 4]; +////label1: for (var n in arr) { +//// break; +//// continue; +//// break label1; +//// continue label1; +//// +//// label2: for (var i = 0; i < arr[n]; i++) { +//// break label1; +//// continue label1; +//// +//// break; +//// continue; +//// break label2; +//// continue label2; +//// +//// function foo() { +//// label3: while (true) { +//// break; +//// continue; +//// break label3; +//// continue label3; +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// +//// label4: [|do|] { +//// [|break|]; +//// [|continue|]; +//// [|break|] label4; +//// [|continue|] label4; +//// +//// break label3; +//// continue label3; +//// +//// switch (10) { +//// case 1: +//// case 2: +//// break; +//// [|break|] label4; +//// default: +//// [|continue|]; +//// } +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// () => { break; } +//// } [|wh/**/ile|] (true) +//// } +//// } +//// } +////} +//// +////label5: while (true) break label5; +//// +////label7: while (true) continue label5; + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts new file mode 100644 index 0000000000..d558e6f385 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts @@ -0,0 +1,77 @@ +/// + +////var arr = [1, 2, 3, 4]; +////label1: for (var n in arr) { +//// break; +//// continue; +//// break label1; +//// continue label1; +//// +//// label2: for (var i = 0; i < arr[n]; i++) { +//// break label1; +//// continue label1; +//// +//// break; +//// continue; +//// break label2; +//// continue label2; +//// +//// function foo() { +//// label3: while (true) { +//// break; +//// continue; +//// break label3; +//// continue label3; +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// +//// label4: do { +//// break; +//// continue; +//// break label4; +//// continue label4; +//// +//// break label3; +//// continue label3; +//// +//// switch (10) { +//// case 1: +//// case 2: +//// break; +//// break label4; +//// default: +//// continue; +//// } +//// +//// // these cross function boundaries +//// break label1; +//// continue label1; +//// break label2; +//// continue label2; +//// () => { break; } +//// } while (true) +//// } +//// } +//// } +////} +//// +////label5: [|while|] (true) [|br/**/eak|] label5; +//// +////label7: while (true) continue label5; + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +goTo.marker(); +test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); +}); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinueNegatives.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinueNegatives.ts new file mode 100644 index 0000000000..0127245dd5 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinueNegatives.ts @@ -0,0 +1,70 @@ +/// + +////var arr = [1, 2, 3, 4]; +////label1: for (var n in arr) { +//// break; +//// continue; +//// break label1; +//// continue label1; +//// +//// label2: for (var i = 0; i < arr[n]; i++) { +//// break label1; +//// continue label1; +//// +//// break; +//// continue; +//// break label2; +//// continue label2; +//// +//// function foo() { +//// label3: while (true) { +//// break; +//// continue; +//// break label3; +//// continue label3; +//// +//// // these cross function boundaries +//// br/*1*/eak label1; +//// cont/*2*/inue label1; +//// bre/*3*/ak label2; +//// c/*4*/ontinue label2; +//// +//// label4: do { +//// break; +//// continue; +//// break label4; +//// continue label4; +//// +//// break label3; +//// continue label3; +//// +//// switch (10) { +//// case 1: +//// case 2: +//// break; +//// break label4; +//// default: +//// continue; +//// } +//// +//// // these cross function boundaries +//// br/*5*/eak label1; +//// co/*6*/ntinue label1; +//// br/*7*/eak label2; +//// con/*8*/tinue label2; +//// () => { b/*9*/reak; } +//// } while (true) +//// } +//// } +//// } +////} +//// +////label5: while (true) break label5; +//// +////label7: while (true) co/*10*/ntinue label5; + +test.markers().forEach(m => { + goTo.position(m.position); + + verify.occurrencesAtPositionCount(0); +}); diff --git a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts index a8c91f530c..dc0db1f4b3 100644 --- a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts +++ b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts @@ -10,7 +10,7 @@ //// [|cas/*3*/e|] 2: //// [|b/*4*/reak|]; //// [|defaul/*5*/t|]: -//// break foo; +//// [|break|] foo; //// } //// case 0xBEEF: //// default: @@ -19,9 +19,18 @@ ////} +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + + for (var i = 1; i <= test.markers().length; i++) { goTo.marker("" + i); - verify.occurrencesAtPositionCount(5); + verify.occurrencesAtPositionCount(6); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); diff --git a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts new file mode 100644 index 0000000000..959ce9d993 --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts @@ -0,0 +1,25 @@ +/// + +////foo: [|switch|] (1) { +//// [|case|] 1: +//// [|case|] 2: +//// [|break|]; +//// [|case|] 3: +//// switch (2) { +//// case 1: +//// [|break|] foo; +//// continue; // invalid +//// default: +//// break; +//// } +//// [|default|]: +//// [|break|]; +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); From 2e2d0c3bf18a0cdb48b6fe4061d9b0646cf366b1 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 9 Sep 2014 17:43:46 -0700 Subject: [PATCH 03/79] Extracted 'break'/'continue' aggregation into common helper function. Also addressed other CR feedback. Still need tests. --- src/services/services.ts | 138 ++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 73 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 3ef524c82e..00be1a7523 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1296,8 +1296,12 @@ module ts { (node.parent).label === node; } + /** + * Whether or not a 'node' is preceded by a label of the given string. + * Note: 'node' cannot be a SourceFile. + */ function isLabelledBy(node: Node, labelName: string) { - for (var owner = node.parent; owner && owner.kind === SyntaxKind.LabelledStatement; owner = owner.parent) { + for (var owner = node.parent; owner.kind === SyntaxKind.LabelledStatement; owner = owner.parent) { if ((owner).label.text === labelName) { return true; } @@ -2326,43 +2330,12 @@ module ts { } } } - - // These track whether we can own unlabeled break/continues. - var breakSearchType = BreakContinueSearchType.All; - var continueSearchType = BreakContinueSearchType.All; - (function aggregateBreakContinues(node: Node) { - // Remember the statuses of the flags before diving into the next node. - var prevBreakSearchType = breakSearchType; - var prevContinueSearchType = continueSearchType; - - switch (node.kind) { - case SyntaxKind.BreakStatement: - case SyntaxKind.ContinueStatement: - if (ownsBreakOrContinue(loopNode, node, breakSearchType, continueSearchType)) { - pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); - } - break; - - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - continueSearchType = BreakContinueSearchType.Labeled; - // Fall through - case SyntaxKind.SwitchStatement: - breakSearchType = BreakContinueSearchType.Labeled; - } - - // Do not cross function boundaries. - if (!isAnyFunction(node)) { - forEachChild(node, aggregateBreakContinues); - } - - // Restore the last state. - breakSearchType = prevBreakSearchType; - continueSearchType = prevContinueSearchType; - })(loopNode.statement); + aggregateBreakAndContinueKeywords(/* owner */ loopNode, + /* startPoint */ loopNode.statement, + /* breakSearchType */ BreakContinueSearchType.All, + /* continueSearchType */ BreakContinueSearchType.All, + /* keywordAccumulator */ keywords); return map(keywords, getReferenceEntryFromNode); } @@ -2375,41 +2348,16 @@ module ts { // Types of break statements we can grab on to. var breakSearchType = BreakContinueSearchType.All; - // Go through each clause in the switch statement, collecting the case/default keywords. + // Go through each clause in the switch statement, collecting the 'case'/'default' keywords. forEach(switchStatement.clauses, clause => { pushKeywordIf(keywords, clause.getFirstToken(), SyntaxKind.CaseKeyword, SyntaxKind.DefaultKeyword); - // For each clause, also recursively traverse the statements where we can find analogous breaks. - forEachChild(clause, function aggregateBreakKeywords(node: Node): void { - // Back the old search value up. - var oldBreakSearchType = breakSearchType; - - switch (node.kind) { - case SyntaxKind.BreakStatement: - // If the break statement has a label, it cannot be part of a switch block. - if (ownsBreakOrContinue(switchStatement, - node, - breakSearchType, - /*continuesSearchType*/ BreakContinueSearchType.None)) { - pushKeywordIf(keywords, node.getFirstToken(), SyntaxKind.BreakKeyword); - } - break; - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - case SyntaxKind.SwitchStatement: - breakSearchType = BreakContinueSearchType.Labeled; - } - - // Do not cross function boundaries. - if (!isAnyFunction(node)) { - forEachChild(node, aggregateBreakKeywords); - } - - // Restore the last state. - breakSearchType = oldBreakSearchType; - }); + // For each clause, aggregate each of the analogous 'break' statements. + aggregateBreakAndContinueKeywords(/* owner */ switchStatement, + /* startPoint */ clause, + /* breakSearchType */ BreakContinueSearchType.All, + /* continueSearchType */ BreakContinueSearchType.None, + /* keywordAccumulator */ keywords); }); return map(keywords, getReferenceEntryFromNode); @@ -2445,10 +2393,54 @@ module ts { return undefined; } + function aggregateBreakAndContinueKeywords(owner: Node, + startPoint: Node, + breakSearchType: BreakContinueSearchType, + continueSearchType: BreakContinueSearchType, + keywordAccumulator: Node[]): void { + (function aggregate(node: Node) { + // Remember the statuses of the flags before diving into the next node. + var prevBreakSearchType = breakSearchType; + var prevContinueSearchType = continueSearchType; + + switch (node.kind) { + case SyntaxKind.BreakStatement: + case SyntaxKind.ContinueStatement: + if (ownsBreakOrContinue(owner, node, breakSearchType, continueSearchType)) { + pushKeywordIf(keywordAccumulator, node.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); + } + break; + + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + // Inner loops take ownership of unlabeled 'continue' statements. + continueSearchType &= ~BreakContinueSearchType.Unlabeled; + // Fall through + case SyntaxKind.SwitchStatement: + // Inner loops & 'switch' statements take ownership of unlabeled 'break' statements. + breakSearchType &= ~BreakContinueSearchType.Unlabeled; + break; + } + + // Do not cross function boundaries. + if (!isAnyFunction(node)) { + forEachChild(node, aggregate); + } + + // Restore the last state. + breakSearchType = prevBreakSearchType; + continueSearchType = prevContinueSearchType; + })(startPoint); + + return; + } + // Note: 'statement' must be a descendant of 'root'. // Reasonable logic for restricting traversal prior to arriving at the // 'statement' node is beyond the scope of this function. - function ownsBreakOrContinue(root: Node, + function ownsBreakOrContinue(owner: Node, statement: BreakOrContinueStatement, breakSearchType: BreakContinueSearchType, continueSearchType: BreakContinueSearchType): boolean { @@ -2456,8 +2448,8 @@ module ts { breakSearchType : continueSearchType; - if (statement.label) { - return isLabelledBy(root, statement.label.text); + if (statement.label && (searchType & BreakContinueSearchType.Labeled)) { + return isLabelledBy(owner, statement.label.text); } else { return !!(searchType & BreakContinueSearchType.Unlabeled); @@ -2817,7 +2809,7 @@ module ts { if (isExternalModule(searchSpaceNode)) { return undefined; } - // Fall through + // Fall through case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: break; From 6cb5096087bb287b58f2fd0ae54325f0b45707e5 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 28 Aug 2014 17:08:48 -0700 Subject: [PATCH 04/79] Make getCurrentDirectory and getDefaultLibFilename invocation in management side --- src/services/services.ts | 80 +++++++++++++++++++++++++++++++++++----- src/services/shims.ts | 9 +++++ 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 0069f53922..e33de3b172 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -417,6 +417,8 @@ module ts { getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot; getLocalizedDiagnosticMessages(): any; getCancellationToken(): CancellationToken; + getDefaultLibFilename(): string; + getCurrentDirectory(): string; } // @@ -683,8 +685,6 @@ module ts { name: string; writeByteOrderMark: boolean; text: string; - fileType: OutputFileType; - sourceMapOutput: any; } export enum EndOfLineState { @@ -1393,6 +1393,7 @@ module ts { var documentRegistry = documentRegistry; var cancellationToken = new CancellationTokenObject(host.getCancellationToken()); var activeCompletionSession: CompletionSession; // The current active completion session, used to get the completion entry details + var writter: (filename: string, data: string, writebyteordermark: boolean) => void = undefined; // Check if the localized messages json is set, otherwise query the host for it if (!TypeScript.LocalizedDiagnosticMessages) { @@ -1419,13 +1420,17 @@ module ts { getNewLine: () => "\r\n", // Need something that doesn't depend on sys.ts here getDefaultLibFilename: (): string => { - throw Error("TOD:: getDefaultLibfilename"); + return host.getDefaultLibFilename(); }, writeFile: (filename, data, writeByteOrderMark) => { - throw Error("TODO: write file"); + if (writter) { + writter(filename, data, writeByteOrderMark); + return; + } + throw Error("Error occurs: Invalid invocation to writeFile"); }, getCurrentDirectory: (): string => { - throw Error("TODO: getCurrentDirectory"); + return host.getCurrentDirectory(); } }; } @@ -2319,7 +2324,7 @@ module ts { return getReferencesForNode(node, program.getSourceFiles()); } - function getReferencesForNode(node: Node, sourceFiles : SourceFile[]): ReferenceEntry[] { + function getReferencesForNode(node: Node, sourceFiles: SourceFile[]): ReferenceEntry[] { // Labels if (isLabelName(node)) { if (isJumpStatementTarget(node)) { @@ -2354,8 +2359,9 @@ module ts { var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), symbol.getDeclarations()); // Get the text to search for, we need to normalize it as external module names will have quote - var symbolName = getNormalizedSymbolName(symbol); + var symbolName = getNormalizedSymbolName(symbol); + // Get syntactic diagnostics var scope = getSymbolScope(symbol); if (scope) { @@ -2385,7 +2391,7 @@ module ts { else { var name = symbol.name; } - + var length = name.length; if (length >= 2 && name.charCodeAt(0) === CharacterCodes.doubleQuote && name.charCodeAt(length - 1) === CharacterCodes.doubleQuote) { return name.substring(1, length - 1); @@ -2658,7 +2664,7 @@ module ts { if (node.kind === SyntaxKind.StringLiteral) { start += 1; end -= 1; - } + } return new ReferenceEntry(node.getSourceFile().filename, TypeScript.TextSpan.fromBounds(start, end), isWriteAccess(node)); } @@ -2834,6 +2840,60 @@ module ts { } } } + function containErrors(diagnostics: Diagnostic[]): boolean { + var hasError = forEach(diagnostics, diagnostic => diagnostic.category === DiagnosticCategory.Error); + return hasError; + } + + function getEmitOutput(filename: string): EmitOutput { + synchronizeHostData(); + filename = TypeScript.switchToForwardSlashes(filename); + var emitToSingleFile = program.getCompilerOptions().out; + var emitDeclaration = program.getCompilerOptions().declaration; + var emitResult: EmitOutput = { + outputFiles: [], + emitOutputResult: null, + }; + + // Initialize writter for CompilerHost.writeFile + writter = function (fileName: string, data: string, writeByteOrderMark: boolean) { + var outputFile: OutputFile = { + name: fileName, + writeByteOrderMark: writeByteOrderMark, + text: data + } + + emitResult.outputFiles.push(outputFile); + } + + // Get syntactic diagnostics + var syntacticDiagnostics = emitToSingleFile + ? program.getDiagnostics(getSourceFile(filename).getSourceFile()) + : program.getDiagnostics(); + program.getGlobalDiagnostics(); + + if (containErrors(syntacticDiagnostics)) { + emitResult.emitOutputResult = EmitOutputResult.FailedBecauseOfSyntaxErrors; + return emitResult; + } + + // Perform semantic and forace a type check before emit to ensure that all symbols are updated + var semanticDiagnostics = emitToSingleFile + ? getFullTypeCheckChecker().getDiagnostics(getSourceFile(filename).getSourceFile()) + : getFullTypeCheckChecker().getDiagnostics(); + getFullTypeCheckChecker().getGlobalDiagnostics(); + getFullTypeCheckChecker().emitFiles(); + + if (emitDeclaration && containErrors(semanticDiagnostics)) { + emitResult.emitOutputResult = EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors; + } + else { + emitResult.emitOutputResult = EmitOutputResult.Succeeded; + } + + // Reset writter back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in an emitting stage + return null; + } /// Syntactic features function getSyntaxTree(filename: string): TypeScript.SyntaxTree { @@ -3185,7 +3245,7 @@ module ts { getFormattingEditsForRange: getFormattingEditsForRange, getFormattingEditsForDocument: getFormattingEditsForDocument, getFormattingEditsAfterKeystroke: getFormattingEditsAfterKeystroke, - getEmitOutput: (filename): EmitOutput => null, + getEmitOutput: getEmitOutput, }; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 0659f9f251..2e19db2815 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -53,6 +53,8 @@ module ts { getScriptSnapshot(fileName: string): ScriptSnapshotShim; getLocalizedDiagnosticMessages(): string; getCancellationToken(): CancellationToken; + getDefaultLibFilename(): string; + getCurrentDirectory(): string; } // @@ -362,6 +364,13 @@ module ts { public getCancellationToken(): CancellationToken { return this.shimHost.getCancellationToken(); } + + getDefaultLibFilename(): string { + return this.shimHost.getDefaultLibFilename(); + } + getCurrentDirectory(): string { + return this.shimHost.getCurrentDirectory(); + } } function simpleForwardCall(logger: Logger, actionDescription: string, action: () => any): any { From da1becccf70ec4a53d4fed9574e07dd529e0512c Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 3 Sep 2014 09:29:33 -0700 Subject: [PATCH 05/79] Add old test files that use getEmitOutput --- tests/cases/{fourslash_old => fourslash}/eval.ts | 0 tests/cases/{fourslash_old => fourslash}/moduleReferenceValue.ts | 0 tests/cases/{fourslash_old => fourslash}/runtimeBehaviorTests.ts | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename tests/cases/{fourslash_old => fourslash}/eval.ts (100%) rename tests/cases/{fourslash_old => fourslash}/moduleReferenceValue.ts (100%) rename tests/cases/{fourslash_old => fourslash}/runtimeBehaviorTests.ts (100%) diff --git a/tests/cases/fourslash_old/eval.ts b/tests/cases/fourslash/eval.ts similarity index 100% rename from tests/cases/fourslash_old/eval.ts rename to tests/cases/fourslash/eval.ts diff --git a/tests/cases/fourslash_old/moduleReferenceValue.ts b/tests/cases/fourslash/moduleReferenceValue.ts similarity index 100% rename from tests/cases/fourslash_old/moduleReferenceValue.ts rename to tests/cases/fourslash/moduleReferenceValue.ts diff --git a/tests/cases/fourslash_old/runtimeBehaviorTests.ts b/tests/cases/fourslash/runtimeBehaviorTests.ts similarity index 100% rename from tests/cases/fourslash_old/runtimeBehaviorTests.ts rename to tests/cases/fourslash/runtimeBehaviorTests.ts From d52fe20df3d77f77be1079bd68e1221cd54cad2f Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 3 Sep 2014 11:07:03 -0700 Subject: [PATCH 06/79] Add getEmitOutput and update call to getCurrentDirectory --- src/compiler/core.ts | 13 +++++++------ src/compiler/emitter.ts | 8 ++++---- src/compiler/parser.ts | 2 +- src/services/services.ts | 15 +++++++++------ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index fbf767b91a..7bc9c7e16b 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -383,11 +383,12 @@ module ts { return [path.substr(0, rootLength)].concat(normalizedParts); } - export function getNormalizedPathComponents(path: string, currentDirectory: string) { + export function getNormalizedPathComponents(path: string, getCurrentDirectory: ()=>string) { var path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { // If the path is not rooted it is relative to current directory + var currentDirectory = getCurrentDirectory(); path = combinePaths(normalizeSlashes(currentDirectory), path); rootLength = getRootLength(path); } @@ -443,18 +444,18 @@ module ts { } } - function getNormalizedPathOrUrlComponents(pathOrUrl: string, currentDirectory: string) { + function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: ()=>string) { if (isUrl(pathOrUrl)) { return getNormalizedPathComponentsOfUrl(pathOrUrl); } else { - return getNormalizedPathComponents(pathOrUrl, currentDirectory); + return getNormalizedPathComponents(pathOrUrl, getCurrentDirectory); } } - export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, isAbsolutePathAnUrl: boolean) { - var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); - var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); + export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, getCurrentDirectory: () => string, isAbsolutePathAnUrl: boolean) { + var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, getCurrentDirectory); + var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, getCurrentDirectory); if (directoryComponents.length > 1 && directoryComponents[directoryComponents.length - 1] === "") { // If the directory path given was of type test/cases/ then we really need components of directry to be only till its name // that is ["test", "cases", ""] needs to be actually ["test", "cases"] diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6b18ad4c13..f8b64dafbc 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -34,7 +34,7 @@ module ts { var newLine = program.getCompilerHost().getNewLine(); function getSourceFilePathInNewDir(newDirPath: string, sourceFile: SourceFile) { - var sourceFilePath = getNormalizedPathFromPathCompoments(getNormalizedPathComponents(sourceFile.filename, compilerHost.getCurrentDirectory())); + var sourceFilePath = getNormalizedPathFromPathCompoments(getNormalizedPathComponents(sourceFile.filename, compilerHost.getCurrentDirectory)); sourceFilePath = sourceFilePath.replace(program.getCommonSourceDirectory(), ""); return combinePaths(newDirPath, sourceFilePath); } @@ -523,7 +523,7 @@ module ts { sourceMapData.sourceMapSources.push(getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.filename, - compilerHost.getCurrentDirectory(), + compilerHost.getCurrentDirectory, /*isAbsolutePathAnUrl*/ true)); sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; @@ -640,7 +640,7 @@ module ts { sourceMapData.jsSourceMappingURL = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizePath(jsFilePath)), // get the relative sourceMapDir path based on jsFilePath combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), // this is where user expects to see sourceMap - compilerHost.getCurrentDirectory(), + compilerHost.getCurrentDirectory, /*isAbsolutePathAnUrl*/ true); } else { @@ -3089,7 +3089,7 @@ module ts { declFileName = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizeSlashes(jsFilePath)), declFileName, - compilerHost.getCurrentDirectory(), + compilerHost.getCurrentDirectory, /*isAbsolutePathAnUrl*/ false); referencePathsOutput += "/// " + newLine; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 68c076367d..64ac468326 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3817,7 +3817,7 @@ module ts { // Each file contributes into common source file path if (!(sourceFile.flags & NodeFlags.DeclarationFile) && !fileExtensionIs(sourceFile.filename, ".js")) { - var sourcePathCompoments = getNormalizedPathComponents(sourceFile.filename, host.getCurrentDirectory()); + var sourcePathCompoments = getNormalizedPathComponents(sourceFile.filename, host.getCurrentDirectory); sourcePathCompoments.pop(); // FileName is not part of directory if (commonPathComponents) { for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathCompoments.length); i++) { diff --git a/src/services/services.ts b/src/services/services.ts index e33de3b172..5be6e29ff6 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2852,7 +2852,7 @@ module ts { var emitDeclaration = program.getCompilerOptions().declaration; var emitResult: EmitOutput = { outputFiles: [], - emitOutputResult: null, + emitOutputResult: undefined, }; // Initialize writter for CompilerHost.writeFile @@ -2862,37 +2862,40 @@ module ts { writeByteOrderMark: writeByteOrderMark, text: data } - emitResult.outputFiles.push(outputFile); } - // Get syntactic diagnostics var syntacticDiagnostics = emitToSingleFile ? program.getDiagnostics(getSourceFile(filename).getSourceFile()) : program.getDiagnostics(); program.getGlobalDiagnostics(); + // If there is any syntactic error, terminate the process if (containErrors(syntacticDiagnostics)) { emitResult.emitOutputResult = EmitOutputResult.FailedBecauseOfSyntaxErrors; return emitResult; } - // Perform semantic and forace a type check before emit to ensure that all symbols are updated + // Perform semantic and force a type check before emit to ensure that all symbols are updated var semanticDiagnostics = emitToSingleFile ? getFullTypeCheckChecker().getDiagnostics(getSourceFile(filename).getSourceFile()) : getFullTypeCheckChecker().getDiagnostics(); getFullTypeCheckChecker().getGlobalDiagnostics(); - getFullTypeCheckChecker().emitFiles(); + var emitOutput = getFullTypeCheckChecker().emitFiles(); if (emitDeclaration && containErrors(semanticDiagnostics)) { emitResult.emitOutputResult = EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors; } + else if (emitDeclaration && containErrors(emitOutput.errors)) { + emitResult.emitOutputResult = EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors; + } else { emitResult.emitOutputResult = EmitOutputResult.Succeeded; } // Reset writter back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in an emitting stage - return null; + this.writter = undefined; + return emitResult; } /// Syntactic features From 8e37730d859e3ecb5800367fbb6ea241ca7f1eeb Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 3 Sep 2014 11:28:55 -0700 Subject: [PATCH 07/79] Update fourslash for getEmitOutput --- src/harness/fourslash.ts | 51 +++++++++++++++++++++++++++ src/harness/harnessLanguageService.ts | 18 +++++++++- src/harness/projectsRunner.ts | 2 +- tests/cases/fourslash/fourslash.ts | 29 +++++++++++++++ 4 files changed, 98 insertions(+), 2 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index c571a7d9f9..01637a7e82 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -189,6 +189,15 @@ module FourSlash { // Whether or not we should format on keystrokes public enableFormatting = true; + // Whether or not to generate .d.ts file + public enableDeclaration = false; + + // Whether or not to generate one output javascript file + public enableSingleOutputFile = false; + + // Output filename for single-output-file option + public singleOutputFilename: string = undefined; + public formatCodeOptions: ts.FormatCodeOptions; public cancellationToken: TestCancellationToken; @@ -452,6 +461,48 @@ module FourSlash { } } + public verifyEmitOutput(state: ts.EmitOutputResult, filename?: string) { + if (this.enableDeclaration) { + this.languageServiceShimHost.setCompilationSettings({generateDeclarationFiles: true}); + } + + if (this.enableSingleOutputFile) { + this.languageServiceShimHost.setCompilationSettings({ outFileOption: this.singleOutputFilename }); + } + + var expectedFilenames:string[] = []; + if (filename !== undefined) { + expectedFilenames = filename.split(" "); + } + + var emit = this.languageService.getEmitOutput(this.activeFile.fileName); + + if (emit.emitOutputResult !== state) { + throw new Error("Expected emitOutputResult '" + state + "', but actual emitOutputResult '" + emit.emitOutputResult + "'"); + } + + var passed = true; + if (emit.outputFiles.length > 0) { + passed = expectedFilenames.every(expectedFilename => { + return emit.outputFiles.some(outputFile => { + return outputFile.name === expectedFilename; + }); + }); + } + + if (!passed) { + var errorMessage = "Expected outputFilename '" + filename + "', but actualy outputFilename '"; + emit.outputFiles.forEach((outputFile, idx, array) => { + errorMessage += outputFile.name; + if (idx !== emit.outputFiles.length - 1) { + errorMessage += " "; + } + }); + errorMessage += "'"; + throw new Error(errorMessage); + } + } + public verifyMemberListContains(symbol: string, type?: string, docComment?: string, fullSymbolName?: string, kind?: string) { this.scenarioActions.push(''); this.scenarioActions.push(''); diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 1a02157d72..e15063204c 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -135,6 +135,8 @@ module Harness.LanguageService { private fileNameToScript: ts.Map = {}; + private settings: any = {}; + constructor(private cancellationToken: ts.CancellationToken = CancellationToken.None) { } @@ -179,6 +181,14 @@ module Harness.LanguageService { throw new Error("No script with name '" + fileName + "'"); } + public getDefaultLibFilename(): string { + return undefined; + } + + public getCurrentDirectory(): string { + return undefined; + } + ////////////////////////////////////////////////////////////////////// // ILogger implementation // @@ -199,7 +209,7 @@ module Harness.LanguageService { /// Returns json for Tools.CompilationSettings public getCompilationSettings(): string { - return JSON.stringify({}); // i.e. default settings + return JSON.stringify(this.settings); } public getCancellationToken(): ts.CancellationToken { @@ -236,6 +246,12 @@ module Harness.LanguageService { return this.ls; } + public setCompilationSettings(settings: any) { + for (var key in settings) { + this.settings[key] = settings[key]; + } + } + /** Return a new instance of the classifier service shim */ public getClassifier(): ts.ClassifierShim { return new TypeScript.Services.TypeScriptServicesFactory().createClassifierShim(this); diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index b0f3e939d3..7a5fa51e14 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -226,7 +226,7 @@ class ProjectRunner extends RunnerBase { ? filename : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(filename); - var diskRelativeName = ts.getRelativePathToDirectoryOrUrl(testCase.projectRoot, diskFileName, getCurrentDirectory(), false); + var diskRelativeName = ts.getRelativePathToDirectoryOrUrl(testCase.projectRoot, diskFileName, getCurrentDirectory, false); if (ts.isRootedDiskPath(diskRelativeName) || diskRelativeName.substr(0, 3) === "../") { // If the generated output file recides in the parent folder or is rooted path, // we need to instead create files that can live in the project reference folder diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index b4080d12e2..91bce54525 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -44,6 +44,14 @@ enum TypingFidelity { High = FourSlash.TypingFidelity.High } +// We have to duplicate EmitOutputResult from Services.ts to expose the enum to getEmitOutput testcases in fourslah +enum EmitOutputResult { + Succeeded, + FailedBecauseOfSyntaxErrors, + FailedBecauseOfCompilerOptionsErrors, + FailedToGenerateDeclarationsBecauseOfSemanticErrors +} + module FourSlashInterface { declare var FourSlash; @@ -255,6 +263,10 @@ module FourSlashInterface { FourSlash.currentTestState.verifyEval(expr, value); } + public emitOutput(expectedState: EmitOutputResult, expectedFilename?: string) { + FourSlash.currentTestState.verifyEmitOutput(expectedState, expectedFilename); + } + public currentLineContentIs(text: string) { FourSlash.currentTestState.verifyCurrentLineContent(text); } @@ -431,6 +443,23 @@ module FourSlashInterface { public disableFormatting() { FourSlash.currentTestState.enableFormatting = false; } + + public enableDeclaration() { + FourSlash.currentTestState.enableDeclaration = true; + } + + public disableDeclaration() { + FourSlash.currentTestState.enableDeclaration = false; + } + + public enableSingleOutputFile(outputFilename: string) { + FourSlash.currentTestState.enableSingleOutputFile = true; + FourSlash.currentTestState.singleOutputFilename = outputFilename; + } + + public disableSingleOutputFile() { + FourSlash.currentTestState.enableSingleOutputFile = false; + } } export class debug { From bfc93d4070844b1ade7475fda5e30f599e7d5362 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 3 Sep 2014 11:35:21 -0700 Subject: [PATCH 08/79] Add getEmitOutput test files --- .../getEmitOutputDeclarationMultiFiles.ts | 21 +++++++++++++++++ .../getEmitOutputDeclarationSingleFile.ts | 23 +++++++++++++++++++ .../cases/fourslash/getEmitOutputNoErrors.ts | 10 ++++++++ .../fourslash/getEmitOutputSingleFile.ts | 19 +++++++++++++++ .../getEmitOutputWithSemanticErrors.ts | 7 ++++++ .../getEmitOutputWithSemanticErrors2.ts | 8 +++++++ .../getEmitOutputWithSyntaxErrors.ts | 6 +++++ .../getEmitOutputWithSyntaxErrors2.ts | 10 ++++++++ 8 files changed, 104 insertions(+) create mode 100644 tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts create mode 100644 tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts create mode 100644 tests/cases/fourslash/getEmitOutputNoErrors.ts create mode 100644 tests/cases/fourslash/getEmitOutputSingleFile.ts create mode 100644 tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts create mode 100644 tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts create mode 100644 tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts create mode 100644 tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts diff --git a/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts b/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts new file mode 100644 index 0000000000..f2d7724e41 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts @@ -0,0 +1,21 @@ +/// + +// @Filename: inputFile1.ts +//// var x: number = 5; +//// class Bar { +//// x : string; +//// y : number +//// } + +// @Filename: inputFile2.ts +//// var x1: string = "hello world"; +//// class Foo{ +//// x : string; +//// y : number; +//// } + +var inputFile1 = "tests/cases/fourslash/inputFile1"; +var inputFile2 = "tests/cases/fourslash/inputFile2"; +edit.enableDeclaration(); +var outputFilenames = inputFile1 + ".js" + " " + inputFile2 + ".js" + " " + inputFile1 + ".d.ts" + " " + inputFile2 + ".d.ts"; +verify.emitOutput(EmitOutputResult.Succeeded, outputFilenames); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts b/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts new file mode 100644 index 0000000000..7366640650 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts @@ -0,0 +1,23 @@ +/// + +// @Filename: inputFile1.ts +//// var x: number = 5; +//// class Bar { +//// x : string; +//// y : number +//// } + +// @Filename: inputFile2.ts +//// var x1: string = "hello world"; +//// class Foo{ +//// x : string; +//// y : number; +//// } + +var singleFilename = "tests/cases/fourslash/declSingleFile"; +var jsFilename = singleFilename + ".js"; +var declFilename = singleFilename + ".d.ts"; +edit.enableSingleOutputFile(jsFilename); +edit.enableDeclaration(); +var outputFilenames = jsFilename + " " + declFilename; +verify.emitOutput(EmitOutputResult.Succeeded, outputFilenames); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputNoErrors.ts b/tests/cases/fourslash/getEmitOutputNoErrors.ts new file mode 100644 index 0000000000..b3cdbc6c46 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputNoErrors.ts @@ -0,0 +1,10 @@ +/// + +// @Filename: noErrorsResult.ts +//// var x; +//// class M { +//// x: number; +//// y: string; +//// } + +verify.emitOutput(EmitOutputResult.Succeeded, "tests/cases/fourslash/noErrorsResult.js"); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSingleFile.ts b/tests/cases/fourslash/getEmitOutputSingleFile.ts new file mode 100644 index 0000000000..13d0d6c9ac --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputSingleFile.ts @@ -0,0 +1,19 @@ +/// + +// @Filename: inputFile1.ts +//// var x: any; +//// class Bar { +//// x : string; +//// y : number +//// } + +// @Filename: inputFile2.ts +//// var x: any; +//// class Foo{ +//// x : string; +//// y : number +//// } + +var outputFilename = "tests/cases/fourslash/singleFile.js"; +edit.enableSingleOutputFile(outputFilename); +verify.emitOutput(EmitOutputResult.Succeeded, outputFilename); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts b/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts new file mode 100644 index 0000000000..8f5a0f98d7 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts @@ -0,0 +1,7 @@ +/// + +// @Filename: semanticErrorsResult.ts +//// var x:number = "hello world"; + +// Only generate javscript file. The semantic error should not affect it +verify.emitOutput(EmitOutputResult.Succeeded,"tests/cases/fourslash/semanticErrorsResult.js"); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts b/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts new file mode 100644 index 0000000000..9bea96ecd0 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts @@ -0,0 +1,8 @@ +/// + +// @Filename: semanticErrorsResult2.ts +//// var x:number = "hello world"; + +edit.enableDeclaration(); +// Fail to generate .d.ts file due to semantic error but succeeded in generate javascript file +verify.emitOutput(EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors,"tests/cases/fourslash/semanticErrorsResult2.js"); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts new file mode 100644 index 0000000000..9679b30130 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts @@ -0,0 +1,6 @@ +/// + +// @Filename: getEmitOutputWithSyntaxErrorsResult.ts +//// var x: + +verify.emitOutput(EmitOutputResult.FailedBecauseOfSyntaxErrors); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts new file mode 100644 index 0000000000..d0f72bc5ad --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts @@ -0,0 +1,10 @@ +/// + +// @Filename: syntaxErrorsResult2.ts +//// var x; +//// class M { +//// x : string; +//// y : numer + +edit.enableDeclaration(); +verify.emitOutput(EmitOutputResult.FailedBecauseOfSyntaxErrors); \ No newline at end of file From 2acd98e03e8059554a57d455b38025ddc0b5233a Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 4 Sep 2014 15:08:50 -0700 Subject: [PATCH 09/79] Minor spelling and spacing fix --- src/compiler/core.ts | 10 +++++----- src/compiler/parser.ts | 16 ++++++++-------- src/services/services.ts | 15 ++++++++------- src/services/shims.ts | 1 + tests/cases/fourslash/fourslash.ts | 8 ++++---- 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 7bc9c7e16b..432ae6ab8c 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -383,7 +383,7 @@ module ts { return [path.substr(0, rootLength)].concat(normalizedParts); } - export function getNormalizedPathComponents(path: string, getCurrentDirectory: ()=>string) { + export function getNormalizedPathComponents(path: string, getCurrentDirectory: () => string) { var path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { @@ -396,7 +396,7 @@ module ts { return normalizedPathComponents(path, rootLength); } - export function getNormalizedPathFromPathCompoments(pathComponents: string[]) { + export function getNormalizedPathFromPathComponents(pathComponents: string[]) { if (pathComponents && pathComponents.length) { return pathComponents[0] + pathComponents.slice(1).join(directorySeparator); } @@ -444,7 +444,7 @@ module ts { } } - function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: ()=>string) { + function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: () => string) { if (isUrl(pathOrUrl)) { return getNormalizedPathComponentsOfUrl(pathOrUrl); } @@ -457,7 +457,7 @@ module ts { var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, getCurrentDirectory); var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, getCurrentDirectory); if (directoryComponents.length > 1 && directoryComponents[directoryComponents.length - 1] === "") { - // If the directory path given was of type test/cases/ then we really need components of directry to be only till its name + // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name // that is ["test", "cases", ""] needs to be actually ["test", "cases"] directoryComponents.length--; } @@ -483,7 +483,7 @@ module ts { } // Cant find the relative path, get the absolute path - var absolutePath = getNormalizedPathFromPathCompoments(pathComponents); + var absolutePath = getNormalizedPathFromPathComponents(pathComponents); if (isAbsolutePathAnUrl && isRootedDiskPath(absolutePath)) { absolutePath = "file:///" + absolutePath; } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 64ac468326..9e254936a6 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3817,11 +3817,11 @@ module ts { // Each file contributes into common source file path if (!(sourceFile.flags & NodeFlags.DeclarationFile) && !fileExtensionIs(sourceFile.filename, ".js")) { - var sourcePathCompoments = getNormalizedPathComponents(sourceFile.filename, host.getCurrentDirectory); - sourcePathCompoments.pop(); // FileName is not part of directory + var sourcePathComponents = getNormalizedPathComponents(sourceFile.filename, host.getCurrentDirectory); + sourcePathComponents.pop(); // FileName is not part of directory if (commonPathComponents) { - for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathCompoments.length); i++) { - if (commonPathComponents[i] !== sourcePathCompoments[i]) { + for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) { + if (commonPathComponents[i] !== sourcePathComponents[i]) { if (i === 0) { errors.push(createCompilerDiagnostic(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)); return; @@ -3834,18 +3834,18 @@ module ts { } // If the fileComponent path completely matched and less than already found update the length - if (sourcePathCompoments.length < commonPathComponents.length) { - commonPathComponents.length = sourcePathCompoments.length; + if (sourcePathComponents.length < commonPathComponents.length) { + commonPathComponents.length = sourcePathComponents.length; } } else { // first file - commonPathComponents = sourcePathCompoments; + commonPathComponents = sourcePathComponents; } } }); - commonSourceDirectory = getNormalizedPathFromPathCompoments(commonPathComponents); + commonSourceDirectory = getNormalizedPathFromPathComponents(commonPathComponents); if (commonSourceDirectory) { // Make sure directory path ends with directory separator so this string can directly // used to replace with "" to get the relative path of the source file and the relative path doesn't diff --git a/src/services/services.ts b/src/services/services.ts index 5be6e29ff6..afa3f200b6 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1393,7 +1393,7 @@ module ts { var documentRegistry = documentRegistry; var cancellationToken = new CancellationTokenObject(host.getCancellationToken()); var activeCompletionSession: CompletionSession; // The current active completion session, used to get the completion entry details - var writter: (filename: string, data: string, writebyteordermark: boolean) => void = undefined; + var writer: (filename: string, data: string, writeByteOrderMark: boolean) => void = undefined; // Check if the localized messages json is set, otherwise query the host for it if (!TypeScript.LocalizedDiagnosticMessages) { @@ -1423,8 +1423,8 @@ module ts { return host.getDefaultLibFilename(); }, writeFile: (filename, data, writeByteOrderMark) => { - if (writter) { - writter(filename, data, writeByteOrderMark); + if (writer) { + writer(filename, data, writeByteOrderMark); return; } throw Error("Error occurs: Invalid invocation to writeFile"); @@ -2840,6 +2840,7 @@ module ts { } } } + function containErrors(diagnostics: Diagnostic[]): boolean { var hasError = forEach(diagnostics, diagnostic => diagnostic.category === DiagnosticCategory.Error); return hasError; @@ -2855,8 +2856,8 @@ module ts { emitOutputResult: undefined, }; - // Initialize writter for CompilerHost.writeFile - writter = function (fileName: string, data: string, writeByteOrderMark: boolean) { + // Initialize writer for CompilerHost.writeFile + writer = function (fileName: string, data: string, writeByteOrderMark: boolean) { var outputFile: OutputFile = { name: fileName, writeByteOrderMark: writeByteOrderMark, @@ -2893,8 +2894,8 @@ module ts { emitResult.emitOutputResult = EmitOutputResult.Succeeded; } - // Reset writter back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in an emitting stage - this.writter = undefined; + // Reset writer back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in an emitting stage + this.writer = undefined; return emitResult; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 2e19db2815..bf2c5f9b6f 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -368,6 +368,7 @@ module ts { getDefaultLibFilename(): string { return this.shimHost.getDefaultLibFilename(); } + getCurrentDirectory(): string { return this.shimHost.getCurrentDirectory(); } diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 91bce54525..d724b75e80 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -46,10 +46,10 @@ enum TypingFidelity { // We have to duplicate EmitOutputResult from Services.ts to expose the enum to getEmitOutput testcases in fourslah enum EmitOutputResult { - Succeeded, - FailedBecauseOfSyntaxErrors, - FailedBecauseOfCompilerOptionsErrors, - FailedToGenerateDeclarationsBecauseOfSemanticErrors + Succeeded, + FailedBecauseOfSyntaxErrors, + FailedBecauseOfCompilerOptionsErrors, + FailedToGenerateDeclarationsBecauseOfSemanticErrors } module FourSlashInterface { From 451f92bc24b6a16e86bdd7c20a95dc8c55c1a782 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 4 Sep 2014 15:10:37 -0700 Subject: [PATCH 10/79] Expose function shouldEmitToOwnFile to be called in services.ts --- src/compiler/emitter.ts | 22 +++++++++++----------- src/services/services.ts | 8 +++++--- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f8b64dafbc..fe96beab83 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -25,6 +25,14 @@ module ts { return indentStrings[1].length; } + export function shouldEmitToOwnFile(sourceFile: SourceFile, compilerOptions: CompilerOptions) { + if (!(sourceFile.flags & NodeFlags.DeclarationFile)) { + if ((isExternalModule(sourceFile) || !compilerOptions.out) && !fileExtensionIs(sourceFile.filename, ".js")) { + return true; + } + } + } + export function emitFiles(resolver: EmitResolver): EmitResult { var program = resolver.getProgram(); var compilerHost = program.getCompilerHost(); @@ -34,19 +42,11 @@ module ts { var newLine = program.getCompilerHost().getNewLine(); function getSourceFilePathInNewDir(newDirPath: string, sourceFile: SourceFile) { - var sourceFilePath = getNormalizedPathFromPathCompoments(getNormalizedPathComponents(sourceFile.filename, compilerHost.getCurrentDirectory)); + var sourceFilePath = getNormalizedPathFromPathComponents(getNormalizedPathComponents(sourceFile.filename, compilerHost.getCurrentDirectory)); sourceFilePath = sourceFilePath.replace(program.getCommonSourceDirectory(), ""); return combinePaths(newDirPath, sourceFilePath); } - function shouldEmitToOwnFile(sourceFile: SourceFile) { - if (!(sourceFile.flags & NodeFlags.DeclarationFile)) { - if ((isExternalModule(sourceFile) || !compilerOptions.out) && !fileExtensionIs(sourceFile.filename, ".js")) { - return true; - } - } - } - function getOwnEmitOutputFilePath(sourceFile: SourceFile, extension: string) { if (program.getCompilerOptions().outDir) { var emitOutputFilePathWithoutExtension = getModuleNameFromFilename(getSourceFilePathInNewDir(program.getCompilerOptions().outDir, sourceFile)); @@ -3082,7 +3082,7 @@ module ts { function writeReferencePath(referencedFile: SourceFile) { var declFileName = referencedFile.flags & NodeFlags.DeclarationFile ? referencedFile.filename // Declaration file, use declaration file name - : shouldEmitToOwnFile(referencedFile) + : shouldEmitToOwnFile(referencedFile, compilerOptions) ? getOwnEmitOutputFilePath(referencedFile, ".d.ts") // Own output file so get the .d.ts file : getModuleNameFromFilename(compilerOptions.out) + ".d.ts";// Global out file @@ -3170,7 +3170,7 @@ module ts { } forEach(program.getSourceFiles(), sourceFile => { - if (shouldEmitToOwnFile(sourceFile)) { + if (shouldEmitToOwnFile(sourceFile, compilerOptions)) { var jsFilePath = getOwnEmitOutputFilePath(sourceFile, ".js"); emitFile(jsFilePath, sourceFile); } diff --git a/src/services/services.ts b/src/services/services.ts index afa3f200b6..8569c859d5 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2849,8 +2849,10 @@ module ts { function getEmitOutput(filename: string): EmitOutput { synchronizeHostData(); filename = TypeScript.switchToForwardSlashes(filename); - var emitToSingleFile = program.getCompilerOptions().out; - var emitDeclaration = program.getCompilerOptions().declaration; + var sourceFile = getSourceFile(filename); + var compilerOptions = program.getCompilerOptions(); + var emitToSingleFile = ts.shouldEmitToOwnFile(program.getSourceFile(filename), compilerOptions); + var emitDeclaration = compilerOptions.declaration; var emitResult: EmitOutput = { outputFiles: [], emitOutputResult: undefined, @@ -2867,7 +2869,7 @@ module ts { } var syntacticDiagnostics = emitToSingleFile - ? program.getDiagnostics(getSourceFile(filename).getSourceFile()) + ? program.getDiagnostics(sourceFile) : program.getDiagnostics(); program.getGlobalDiagnostics(); From b0654dc0442282c0c7d3619984878c706653e4e3 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 4 Sep 2014 15:12:15 -0700 Subject: [PATCH 11/79] Remove enableSingleOutputFile boolean and use singleOutputFilename to check if singleOutputFile is specified --- src/harness/fourslash.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 01637a7e82..2a4124c842 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -192,9 +192,6 @@ module FourSlash { // Whether or not to generate .d.ts file public enableDeclaration = false; - // Whether or not to generate one output javascript file - public enableSingleOutputFile = false; - // Output filename for single-output-file option public singleOutputFilename: string = undefined; @@ -463,10 +460,10 @@ module FourSlash { public verifyEmitOutput(state: ts.EmitOutputResult, filename?: string) { if (this.enableDeclaration) { - this.languageServiceShimHost.setCompilationSettings({generateDeclarationFiles: true}); + this.languageServiceShimHost.setCompilationSettings({ generateDeclarationFiles: true }); } - if (this.enableSingleOutputFile) { + if (this.singleOutputFilename !== undefined) { this.languageServiceShimHost.setCompilationSettings({ outFileOption: this.singleOutputFilename }); } From 623b97f2ec653f92bd72c5081b5c3e2721323a8e Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 4 Sep 2014 15:13:54 -0700 Subject: [PATCH 12/79] Add check if the compilationSetting object hasOwnProperty before add the property to TypeScriptLS object --- src/harness/harnessLanguageService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index e15063204c..c30ea6d5ce 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -248,7 +248,9 @@ module Harness.LanguageService { public setCompilationSettings(settings: any) { for (var key in settings) { - this.settings[key] = settings[key]; + if (settings.hasOwnProperty(key)) { + this.settings[key] = settings[key]; + } } } From 537f55ceded48f82d40c3e670381b26cf91c2eb0 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 5 Sep 2014 16:15:12 -0700 Subject: [PATCH 13/79] Change getCurrentDirectory and getDefaultLibname from passing around function to its final value --- src/compiler/core.ts | 13 ++++++------- src/compiler/emitter.ts | 8 ++++---- src/compiler/parser.ts | 2 +- src/harness/projectsRunner.ts | 2 +- src/services/services.ts | 11 ++++------- 5 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 432ae6ab8c..4f50f31134 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -383,12 +383,11 @@ module ts { return [path.substr(0, rootLength)].concat(normalizedParts); } - export function getNormalizedPathComponents(path: string, getCurrentDirectory: () => string) { + export function getNormalizedPathComponents(path: string, currentDirectory: string) { var path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { // If the path is not rooted it is relative to current directory - var currentDirectory = getCurrentDirectory(); path = combinePaths(normalizeSlashes(currentDirectory), path); rootLength = getRootLength(path); } @@ -444,18 +443,18 @@ module ts { } } - function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: () => string) { + function getNormalizedPathOrUrlComponents(pathOrUrl: string, currentDirectory: string) { if (isUrl(pathOrUrl)) { return getNormalizedPathComponentsOfUrl(pathOrUrl); } else { - return getNormalizedPathComponents(pathOrUrl, getCurrentDirectory); + return getNormalizedPathComponents(pathOrUrl, currentDirectory); } } - export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, getCurrentDirectory: () => string, isAbsolutePathAnUrl: boolean) { - var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, getCurrentDirectory); - var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, getCurrentDirectory); + export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, isAbsolutePathAnUrl: boolean) { + var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); + var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); if (directoryComponents.length > 1 && directoryComponents[directoryComponents.length - 1] === "") { // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name // that is ["test", "cases", ""] needs to be actually ["test", "cases"] diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index fe96beab83..da67c2d2f1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -42,7 +42,7 @@ module ts { var newLine = program.getCompilerHost().getNewLine(); function getSourceFilePathInNewDir(newDirPath: string, sourceFile: SourceFile) { - var sourceFilePath = getNormalizedPathFromPathComponents(getNormalizedPathComponents(sourceFile.filename, compilerHost.getCurrentDirectory)); + var sourceFilePath = getNormalizedPathFromPathComponents(getNormalizedPathComponents(sourceFile.filename, compilerHost.getCurrentDirectory())); sourceFilePath = sourceFilePath.replace(program.getCommonSourceDirectory(), ""); return combinePaths(newDirPath, sourceFilePath); } @@ -523,7 +523,7 @@ module ts { sourceMapData.sourceMapSources.push(getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.filename, - compilerHost.getCurrentDirectory, + compilerHost.getCurrentDirectory(), /*isAbsolutePathAnUrl*/ true)); sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; @@ -640,7 +640,7 @@ module ts { sourceMapData.jsSourceMappingURL = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizePath(jsFilePath)), // get the relative sourceMapDir path based on jsFilePath combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), // this is where user expects to see sourceMap - compilerHost.getCurrentDirectory, + compilerHost.getCurrentDirectory(), /*isAbsolutePathAnUrl*/ true); } else { @@ -3089,7 +3089,7 @@ module ts { declFileName = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizeSlashes(jsFilePath)), declFileName, - compilerHost.getCurrentDirectory, + compilerHost.getCurrentDirectory(), /*isAbsolutePathAnUrl*/ false); referencePathsOutput += "/// " + newLine; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 9e254936a6..ffc30e8e69 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3817,7 +3817,7 @@ module ts { // Each file contributes into common source file path if (!(sourceFile.flags & NodeFlags.DeclarationFile) && !fileExtensionIs(sourceFile.filename, ".js")) { - var sourcePathComponents = getNormalizedPathComponents(sourceFile.filename, host.getCurrentDirectory); + var sourcePathComponents = getNormalizedPathComponents(sourceFile.filename, host.getCurrentDirectory()); sourcePathComponents.pop(); // FileName is not part of directory if (commonPathComponents) { for (var i = 0; i < Math.min(commonPathComponents.length, sourcePathComponents.length); i++) { diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 7a5fa51e14..b0f3e939d3 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -226,7 +226,7 @@ class ProjectRunner extends RunnerBase { ? filename : ts.normalizeSlashes(testCase.projectRoot) + "/" + ts.normalizeSlashes(filename); - var diskRelativeName = ts.getRelativePathToDirectoryOrUrl(testCase.projectRoot, diskFileName, getCurrentDirectory, false); + var diskRelativeName = ts.getRelativePathToDirectoryOrUrl(testCase.projectRoot, diskFileName, getCurrentDirectory(), false); if (ts.isRootedDiskPath(diskRelativeName) || diskRelativeName.substr(0, 3) === "../") { // If the generated output file recides in the parent folder or is rooted path, // we need to instead create files that can live in the project reference folder diff --git a/src/services/services.ts b/src/services/services.ts index 8569c859d5..1c6eebb941 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1420,17 +1420,14 @@ module ts { getNewLine: () => "\r\n", // Need something that doesn't depend on sys.ts here getDefaultLibFilename: (): string => { - return host.getDefaultLibFilename(); + return ""; }, writeFile: (filename, data, writeByteOrderMark) => { - if (writer) { - writer(filename, data, writeByteOrderMark); - return; - } - throw Error("Error occurs: Invalid invocation to writeFile"); + writer(filename, data, writeByteOrderMark); }, getCurrentDirectory: (): string => { - return host.getCurrentDirectory(); + // Return empty string as in compilerHost using with Visual Studio should not need to getCurrentDirectory since CompilerHost should have absolute path already + return ""; } }; } From 6ef41a74c7f34a23dab93e70413c589ec47e2bbe Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 5 Sep 2014 16:18:39 -0700 Subject: [PATCH 14/79] Move checking semantic diagnostics into emitFiles function rather than getEmitOutput --- src/compiler/checker.ts | 6 ++++ src/compiler/emitter.ts | 24 ++++++++++++-- src/compiler/types.ts | 11 +++++++ src/harness/fourslash.ts | 6 ++-- src/services/services.ts | 50 +++++++++--------------------- tests/cases/fourslash/fourslash.ts | 17 +++++----- 6 files changed, 67 insertions(+), 47 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c96b2edc5b..1d50ab4e19 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7181,6 +7181,11 @@ module ts { return target !== unknownSymbol && ((target.flags & SymbolFlags.Value) !== 0); } + function hasSemanticErrors() { + // Return true if there is any semantic error in a file or globally + return (getDiagnostics().length > 0) || (getGlobalDiagnostics().length > 0); + } + function shouldEmitDeclarations() { // If the declaration emit and there are no errors being reported in program or by checker // declarations can be emitted @@ -7258,6 +7263,7 @@ module ts { getNodeCheckFlags: getNodeCheckFlags, getEnumMemberValue: getEnumMemberValue, isTopLevelValueImportedViaEntityName: isTopLevelValueImportedViaEntityName, + hasSemanticErrors: hasSemanticErrors, shouldEmitDeclarations: shouldEmitDeclarations, isDeclarationVisible: isDeclarationVisible, isImplementationOfOverload: isImplementationOfOverload, diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index da67c2d2f1..6a7efc5dbc 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -48,8 +48,8 @@ module ts { } function getOwnEmitOutputFilePath(sourceFile: SourceFile, extension: string) { - if (program.getCompilerOptions().outDir) { - var emitOutputFilePathWithoutExtension = getModuleNameFromFilename(getSourceFilePathInNewDir(program.getCompilerOptions().outDir, sourceFile)); + if (compilerOptions.outDir) { + var emitOutputFilePathWithoutExtension = getModuleNameFromFilename(getSourceFilePathInNewDir(compilerOptions.outDir, sourceFile)); } else { var emitOutputFilePathWithoutExtension = getModuleNameFromFilename(sourceFile.filename); @@ -3183,7 +3183,27 @@ module ts { diagnostics.sort(compareDiagnostics); diagnostics = deduplicateSortedDiagnostics(diagnostics); + var returnCode = EmitReturnStatus.Succeeded; + + // Check if there is any diagnostic in an error category; if so, there is an emitter error + var hasEmitterError = forEach(diagnostics, diagnostic => diagnostic.category === DiagnosticCategory.Error); + + if (resolver.hasSemanticErrors() && !compilerOptions.declaration) { + // There is an semantic errror when output javascript file + // Output JS file with semantic error + returnCode = EmitReturnStatus.JSGeneratedWithSemanticErrors; + } + else if (resolver.hasSemanticErrors() && compilerOptions.declaration) { + // There is an semantic errror when output javascript and declaration file + // Output JS file with semantic error, not output declaration file + returnCode = EmitReturnStatus.DeclarationGenerationSkipped; + } + else if (hasEmitterError) { + returnCode = EmitReturnStatus.EmitErrorsEncountered; + } + return { + emitResultStatus: returnCode, errors: diagnostics, sourceMaps: sourceMapDataList }; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c13b47a066..e34afd7784 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -588,7 +588,17 @@ module ts { sourceMapDecodedMappings: SourceMapSpan[]; } + // Return code used by getEmitOutput function to indicate status of the function + export enum EmitReturnStatus { + Succeeded = 0, // All outputs generated as requested (.js, .map, .d.ts), no errors reported + AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, or compiler options errors, nothing generated + JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors + DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors + EmitErrorsEncountered = 4 // Emitter errors occured during emitting process + } + export interface EmitResult { + emitResultStatus: EmitReturnStatus; errors: Diagnostic[]; sourceMaps: SourceMapData[]; // Array of sourceMapData if compiler emitted sourcemaps } @@ -660,6 +670,7 @@ module ts { isTopLevelValueImportedViaEntityName(node: ImportDeclaration): boolean; getNodeCheckFlags(node: Node): NodeCheckFlags; getEnumMemberValue(node: EnumMember): number; + hasSemanticErrors(): boolean; shouldEmitDeclarations(): boolean; isDeclarationVisible(node: Declaration): boolean; isImplementationOfOverload(node: FunctionDeclaration): boolean; diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 2a4124c842..94b60420bb 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -458,7 +458,7 @@ module FourSlash { } } - public verifyEmitOutput(state: ts.EmitOutputResult, filename?: string) { + public verifyEmitOutput(state: ts.EmitReturnStatus, filename?: string) { if (this.enableDeclaration) { this.languageServiceShimHost.setCompilationSettings({ generateDeclarationFiles: true }); } @@ -474,8 +474,8 @@ module FourSlash { var emit = this.languageService.getEmitOutput(this.activeFile.fileName); - if (emit.emitOutputResult !== state) { - throw new Error("Expected emitOutputResult '" + state + "', but actual emitOutputResult '" + emit.emitOutputResult + "'"); + if (emit.emitOutputStatus !== state) { + throw new Error("Expected emitOutputResult '" + state + "', but actual emitOutputResult '" + emit.emitOutputStatus + "'"); } var passed = true; diff --git a/src/services/services.ts b/src/services/services.ts index 1c6eebb941..c49615f678 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -663,16 +663,9 @@ module ts { docComment: string; } - export enum EmitOutputResult { - Succeeded, - FailedBecauseOfSyntaxErrors, - FailedBecauseOfCompilerOptionsErrors, - FailedToGenerateDeclarationsBecauseOfSemanticErrors - } - export interface EmitOutput { outputFiles: OutputFile[]; - emitOutputResult: EmitOutputResult; + emitOutputStatus: EmitReturnStatus; } export enum OutputFileType { @@ -2846,56 +2839,43 @@ module ts { function getEmitOutput(filename: string): EmitOutput { synchronizeHostData(); filename = TypeScript.switchToForwardSlashes(filename); - var sourceFile = getSourceFile(filename); + var sourceFile = program.getSourceFile(filename); var compilerOptions = program.getCompilerOptions(); - var emitToSingleFile = ts.shouldEmitToOwnFile(program.getSourceFile(filename), compilerOptions); + var emitToSingleFile = ts.shouldEmitToOwnFile(sourceFile, compilerOptions); var emitDeclaration = compilerOptions.declaration; - var emitResult: EmitOutput = { + var emitOutput: EmitOutput = { outputFiles: [], - emitOutputResult: undefined, + emitOutputStatus: undefined, }; // Initialize writer for CompilerHost.writeFile writer = function (fileName: string, data: string, writeByteOrderMark: boolean) { - var outputFile: OutputFile = { + emitOutput.outputFiles.push({ name: fileName, writeByteOrderMark: writeByteOrderMark, text: data - } - emitResult.outputFiles.push(outputFile); + }); } var syntacticDiagnostics = emitToSingleFile ? program.getDiagnostics(sourceFile) : program.getDiagnostics(); - program.getGlobalDiagnostics(); + var globalSyntacticDiagnostics = program.getGlobalDiagnostics(); // If there is any syntactic error, terminate the process if (containErrors(syntacticDiagnostics)) { - emitResult.emitOutputResult = EmitOutputResult.FailedBecauseOfSyntaxErrors; - return emitResult; + emitOutput.emitOutputStatus = EmitReturnStatus.AllOutputGenerationSkipped; + return emitOutput; } // Perform semantic and force a type check before emit to ensure that all symbols are updated - var semanticDiagnostics = emitToSingleFile - ? getFullTypeCheckChecker().getDiagnostics(getSourceFile(filename).getSourceFile()) - : getFullTypeCheckChecker().getDiagnostics(); - getFullTypeCheckChecker().getGlobalDiagnostics(); - var emitOutput = getFullTypeCheckChecker().emitFiles(); + // EmitFiles will report if there is an error from TypeChecker and Emitter + var emitFilesResult = getFullTypeCheckChecker().emitFiles(); + emitOutput.emitOutputStatus = emitFilesResult.emitResultStatus; - if (emitDeclaration && containErrors(semanticDiagnostics)) { - emitResult.emitOutputResult = EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors; - } - else if (emitDeclaration && containErrors(emitOutput.errors)) { - emitResult.emitOutputResult = EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors; - } - else { - emitResult.emitOutputResult = EmitOutputResult.Succeeded; - } - - // Reset writer back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in an emitting stage + // Reset writer back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in getEmitOutput this.writer = undefined; - return emitResult; + return emitOutput; } /// Syntactic features diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index d724b75e80..9a6e03845e 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -44,14 +44,17 @@ enum TypingFidelity { High = FourSlash.TypingFidelity.High } -// We have to duplicate EmitOutputResult from Services.ts to expose the enum to getEmitOutput testcases in fourslah -enum EmitOutputResult { - Succeeded, - FailedBecauseOfSyntaxErrors, - FailedBecauseOfCompilerOptionsErrors, - FailedToGenerateDeclarationsBecauseOfSemanticErrors +// Return code used by getEmitOutput function to indicate status of the function +// It is a duplicate of the one in types.ts to expose it to testcases in fourslash +enum EmitReturnStatus { + Succeeded = 0, // All outputs generated as requested (.js, .map, .d.ts), no errors reported + AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, or compiler options errors, nothing generated + JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors + DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors + EmitErrorsEncountered = 4 // Emitter errors occured during emitting process } + module FourSlashInterface { declare var FourSlash; @@ -263,7 +266,7 @@ module FourSlashInterface { FourSlash.currentTestState.verifyEval(expr, value); } - public emitOutput(expectedState: EmitOutputResult, expectedFilename?: string) { + public emitOutput(expectedState: EmitReturnStatus, expectedFilename?: string) { FourSlash.currentTestState.verifyEmitOutput(expectedState, expectedFilename); } From be4133a1622ad48d3272048721987d9d6e128521 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 8 Sep 2014 16:20:41 -0700 Subject: [PATCH 15/79] Add meta-data flag name to modify compilationSettings --- src/harness/fourslash.ts | 64 +++++++++++++++++++-------- src/harness/harnessLanguageService.ts | 5 +-- src/services/shims.ts | 5 ++- tests/cases/fourslash/fourslash.ts | 17 ------- 4 files changed, 52 insertions(+), 39 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 94b60420bb..82a584d5f5 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -122,9 +122,47 @@ module FourSlash { return s.replace(/[&<>"'\/]/g, ch => entityMap[ch]); } + // Name of ts.CompilerOptions properties that will be used by globalOptions + // To add additional option, add property into the compilerOptMetadataNames, refer the property in either globalMetadataNames or fileMetadataNames + // Add cases into convertGlobalOptionsToCompilationsSettings function for the compiler to acknowledge such option from meta data + var compilerOptMetadataNames = { + out: 'out', + outDir: 'outDir', + declaration: 'declaration', + sourceMap: 'sourceMap', + sourceRoot: 'sourceRoot' + }; + // List of allowed metadata names var fileMetadataNames = ['Filename']; - var globalMetadataNames = ['Module', 'Target', 'BaselineFile']; // Note: Only BaselineFile is actually supported at the moment + var globalMetadataNames = ['BaselineFile', compilerOptMetadataNames.out, compilerOptMetadataNames.outDir, compilerOptMetadataNames.declaration, compilerOptMetadataNames.outDir, + compilerOptMetadataNames.declaration, compilerOptMetadataNames.sourceMap, compilerOptMetadataNames.sourceRoot] + + function convertGlobalOptionsToCompilationSettings(globalOptions: { [idx: string]: string }): ts.CompilationSettings { + var settings: ts.CompilationSettings = {}; + // Convert all property in globalOptions into ts.CompilationSettings + for (var prop in globalOptions) { + if (globalOptions.hasOwnProperty(prop)) { + switch (prop) { + case compilerOptMetadataNames.out: + settings.outFileOption = globalOptions[prop]; + break; + case compilerOptMetadataNames.outDir: + settings.outDirOption = globalOptions[prop]; + break; + case compilerOptMetadataNames.declaration: + settings.generateDeclarationFiles = true; + break; + case compilerOptMetadataNames.sourceMap: + settings.mapSourceFiles = true; + break; + case compilerOptMetadataNames.sourceRoot: + settings.sourceRoot = globalOptions[prop] + } + } + } + return settings; + } export var currentTestState: TestState = null; @@ -189,12 +227,6 @@ module FourSlash { // Whether or not we should format on keystrokes public enableFormatting = true; - // Whether or not to generate .d.ts file - public enableDeclaration = false; - - // Output filename for single-output-file option - public singleOutputFilename: string = undefined; - public formatCodeOptions: ts.FormatCodeOptions; public cancellationToken: TestCancellationToken; @@ -205,11 +237,15 @@ module FourSlash { private scenarioActions: string[] = []; private taoInvalidReason: string = null; + constructor(public testData: FourSlashData) { // Initialize the language service with all the scripts this.cancellationToken = new TestCancellationToken(); this.languageServiceShimHost = new Harness.LanguageService.TypeScriptLS(this.cancellationToken); + var compilationSettings = convertGlobalOptionsToCompilationSettings(this.testData.globalOptions); + this.languageServiceShimHost.setCompilationSettings(compilationSettings); + var inputFiles: { unitName: string; content: string }[] = []; testData.files.forEach(file => { @@ -226,9 +262,9 @@ module FourSlash { //if (/require\(/.test(lastFile.content) || /reference\spath/.test(lastFile.content)) { // inputFiles.push({ unitName: lastFile.fileName, content: lastFile.content }); //} else { - inputFiles = testData.files.map(file => { - return { unitName: file.fileName, content: file.content }; - }); + inputFiles = testData.files.map(file => { + return { unitName: file.fileName, content: file.content }; + }); //} @@ -459,14 +495,6 @@ module FourSlash { } public verifyEmitOutput(state: ts.EmitReturnStatus, filename?: string) { - if (this.enableDeclaration) { - this.languageServiceShimHost.setCompilationSettings({ generateDeclarationFiles: true }); - } - - if (this.singleOutputFilename !== undefined) { - this.languageServiceShimHost.setCompilationSettings({ outFileOption: this.singleOutputFilename }); - } - var expectedFilenames:string[] = []; if (filename !== undefined) { expectedFilenames = filename.split(" "); diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index c30ea6d5ce..fdf246df9c 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -134,8 +134,7 @@ module Harness.LanguageService { private ls: ts.LanguageServiceShim = null; private fileNameToScript: ts.Map = {}; - - private settings: any = {}; + private settings: ts.CompilationSettings = {}; constructor(private cancellationToken: ts.CancellationToken = CancellationToken.None) { } @@ -246,7 +245,7 @@ module Harness.LanguageService { return this.ls; } - public setCompilationSettings(settings: any) { + public setCompilationSettings(settings: ts.CompilationSettings) { for (var key in settings) { if (settings.hasOwnProperty(key)) { this.settings[key] = settings[key]; diff --git a/src/services/shims.ts b/src/services/shims.ts index bf2c5f9b6f..605308d7b5 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -159,7 +159,7 @@ module ts { Asynchronous = 2, } - interface CompilationSettings { + export interface CompilationSettings { propagateEnumConstants?: boolean; removeComments?: boolean; watch?: boolean; @@ -179,6 +179,9 @@ module ts { gatherDiagnostics?: boolean; codepage?: number; emitBOM?: boolean; + + // Declare indexer signature + [index: string]: any; } function languageVersionToScriptTarget(languageVersion: LanguageVersion): ScriptTarget { diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 9a6e03845e..577d2f4dc0 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -446,23 +446,6 @@ module FourSlashInterface { public disableFormatting() { FourSlash.currentTestState.enableFormatting = false; } - - public enableDeclaration() { - FourSlash.currentTestState.enableDeclaration = true; - } - - public disableDeclaration() { - FourSlash.currentTestState.enableDeclaration = false; - } - - public enableSingleOutputFile(outputFilename: string) { - FourSlash.currentTestState.enableSingleOutputFile = true; - FourSlash.currentTestState.singleOutputFilename = outputFilename; - } - - public disableSingleOutputFile() { - FourSlash.currentTestState.enableSingleOutputFile = false; - } } export class debug { From 2a24ea585484d8c4c36c5ad01d7904cba440f0ac Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 8 Sep 2014 16:22:24 -0700 Subject: [PATCH 16/79] Fix spelling --- src/harness/fourslash.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 82a584d5f5..c7b0443c2c 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -516,7 +516,7 @@ module FourSlash { } if (!passed) { - var errorMessage = "Expected outputFilename '" + filename + "', but actualy outputFilename '"; + var errorMessage = "Expected outputFilename '" + filename + "', but actual outputFilename '"; emit.outputFiles.forEach((outputFile, idx, array) => { errorMessage += outputFile.name; if (idx !== emit.outputFiles.length - 1) { @@ -1274,7 +1274,7 @@ module FourSlash { private applyEdits(fileName: string, edits: ts.TextChange[], isFormattingEdit = false): number { // We get back a set of edits, but langSvc.editScript only accepts one at a time. Use this to keep track - // of the incremental offest from each edit to the next. Assumption is that these edit ranges don't overlap + // of the incremental offset from each edit to the next. Assumption is that these edit ranges don't overlap var runningOffset = 0; edits = edits.sort((a, b) => a.span.start() - b.span.start()); // Get a snapshot of the content of the file so we can make sure any formatting edits didn't destroy non-whitespace characters @@ -1351,7 +1351,7 @@ module FourSlash { var definitions = this.languageService.getDefinitionAtPosition(this.activeFile.fileName, this.currentCaretPosition); if (!definitions || !definitions.length) { - throw new Error('goToDefinition failed - expected to at least one defintion location but got 0'); + throw new Error('goToDefinition failed - expected to at least one definition location but got 0'); } if (definitionIndex >= definitions.length) { @@ -1371,10 +1371,10 @@ module FourSlash { var foundDefinitions = definitions && definitions.length; if (foundDefinitions && negative) { - throw new Error('goToDefinition - expected to 0 defintion locations but got ' + definitions.length); + throw new Error('goToDefinition - expected to 0 definition locations but got ' + definitions.length); } else if (!foundDefinitions && !negative) { - throw new Error('goToDefinition - expected to at least one defintion location but got 0'); + throw new Error('goToDefinition - expected to at least one definition location but got 0'); } } @@ -2222,7 +2222,7 @@ module FourSlash { /// A list of ranges we've collected so far */ var localRanges: Range[] = []; - /// The latest position of the start of an unflushed plaintext area + /// The latest position of the start of an unflushed plain text area var lastNormalCharPosition: number = 0; /// The total number of metacharacters removed from the file (so far) From ed224ca9039759432286c1e7c22c5c7b4858f874 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 8 Sep 2014 16:23:38 -0700 Subject: [PATCH 17/79] Update getEmitOutput test files to use new meta-data flag --- .../cases/fourslash/getEmitOutputDeclarationMultiFiles.ts | 4 ++-- .../cases/fourslash/getEmitOutputDeclarationSingleFile.ts | 8 ++++---- tests/cases/fourslash/getEmitOutputNoErrors.ts | 2 +- tests/cases/fourslash/getEmitOutputSingleFile.ts | 4 ++-- tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts | 2 +- tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts | 4 ++-- tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts | 2 +- tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts b/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts index f2d7724e41..5e2941f04f 100644 --- a/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts +++ b/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts @@ -1,5 +1,6 @@ /// +// @declaration: true // @Filename: inputFile1.ts //// var x: number = 5; //// class Bar { @@ -16,6 +17,5 @@ var inputFile1 = "tests/cases/fourslash/inputFile1"; var inputFile2 = "tests/cases/fourslash/inputFile2"; -edit.enableDeclaration(); var outputFilenames = inputFile1 + ".js" + " " + inputFile2 + ".js" + " " + inputFile1 + ".d.ts" + " " + inputFile2 + ".d.ts"; -verify.emitOutput(EmitOutputResult.Succeeded, outputFilenames); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.Succeeded); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts b/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts index 7366640650..92acfda441 100644 --- a/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts +++ b/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts @@ -1,6 +1,8 @@ /// +// @declaration: true // @Filename: inputFile1.ts +// @out: declSingleFile.js //// var x: number = 5; //// class Bar { //// x : string; @@ -14,10 +16,8 @@ //// y : number; //// } -var singleFilename = "tests/cases/fourslash/declSingleFile"; +var singleFilename = "declSingleFile"; var jsFilename = singleFilename + ".js"; var declFilename = singleFilename + ".d.ts"; -edit.enableSingleOutputFile(jsFilename); -edit.enableDeclaration(); var outputFilenames = jsFilename + " " + declFilename; -verify.emitOutput(EmitOutputResult.Succeeded, outputFilenames); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.Succeeded, outputFilenames); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputNoErrors.ts b/tests/cases/fourslash/getEmitOutputNoErrors.ts index b3cdbc6c46..a2b2797ed6 100644 --- a/tests/cases/fourslash/getEmitOutputNoErrors.ts +++ b/tests/cases/fourslash/getEmitOutputNoErrors.ts @@ -7,4 +7,4 @@ //// y: string; //// } -verify.emitOutput(EmitOutputResult.Succeeded, "tests/cases/fourslash/noErrorsResult.js"); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.Succeeded, "tests/cases/fourslash/noErrorsResult.js"); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSingleFile.ts b/tests/cases/fourslash/getEmitOutputSingleFile.ts index 13d0d6c9ac..d273af02b8 100644 --- a/tests/cases/fourslash/getEmitOutputSingleFile.ts +++ b/tests/cases/fourslash/getEmitOutputSingleFile.ts @@ -1,5 +1,6 @@ /// +// @out: tests/cases/fourslash/singleFile.js // @Filename: inputFile1.ts //// var x: any; //// class Bar { @@ -15,5 +16,4 @@ //// } var outputFilename = "tests/cases/fourslash/singleFile.js"; -edit.enableSingleOutputFile(outputFilename); -verify.emitOutput(EmitOutputResult.Succeeded, outputFilename); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.Succeeded, outputFilename); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts b/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts index 8f5a0f98d7..fb9929e36d 100644 --- a/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts +++ b/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts @@ -4,4 +4,4 @@ //// var x:number = "hello world"; // Only generate javscript file. The semantic error should not affect it -verify.emitOutput(EmitOutputResult.Succeeded,"tests/cases/fourslash/semanticErrorsResult.js"); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.JSGeneratedWithSemanticErrors,"tests/cases/fourslash/semanticErrorsResult.js"); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts b/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts index 9bea96ecd0..bc7aacc0c9 100644 --- a/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts +++ b/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts @@ -1,8 +1,8 @@ /// +// @declaration: true // @Filename: semanticErrorsResult2.ts //// var x:number = "hello world"; -edit.enableDeclaration(); // Fail to generate .d.ts file due to semantic error but succeeded in generate javascript file -verify.emitOutput(EmitOutputResult.FailedToGenerateDeclarationsBecauseOfSemanticErrors,"tests/cases/fourslash/semanticErrorsResult2.js"); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.DeclarationGenerationSkipped,"tests/cases/fourslash/semanticErrorsResult2.js"); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts index 9679b30130..655de166c9 100644 --- a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts +++ b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts @@ -3,4 +3,4 @@ // @Filename: getEmitOutputWithSyntaxErrorsResult.ts //// var x: -verify.emitOutput(EmitOutputResult.FailedBecauseOfSyntaxErrors); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.AllOutputGenerationSkipped); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts index d0f72bc5ad..b74b7c9483 100644 --- a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts +++ b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts @@ -1,10 +1,10 @@ /// +// @declaration // @Filename: syntaxErrorsResult2.ts //// var x; //// class M { //// x : string; //// y : numer -edit.enableDeclaration(); -verify.emitOutput(EmitOutputResult.FailedBecauseOfSyntaxErrors); \ No newline at end of file +verify.emitOutput(EmitReturnStatus.AllOutputGenerationSkipped); \ No newline at end of file From 6cba535f204d1c2ac9f6c8111843ab58397d020e Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 9 Sep 2014 17:41:34 -0700 Subject: [PATCH 18/79] Fix spelling --- src/compiler/types.ts | 4 ++-- src/harness/harness.ts | 4 ++-- src/services/services.ts | 36 ++++++++++++++++++------------------ src/services/shims.ts | 22 +++++++++++----------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e34afd7784..70c02cf594 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -569,7 +569,7 @@ module ts { export interface SourceMapData { /** Where the sourcemap file is written */ sourceMapFilePath: string; - /** source map url written in the js file */ + /** source map URL written in the js file */ jsSourceMappingURL: string; /** Source map's file field - js file name*/ sourceMapFile: string; @@ -594,7 +594,7 @@ module ts { AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, or compiler options errors, nothing generated JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors - EmitErrorsEncountered = 4 // Emitter errors occured during emitting process + EmitErrorsEncountered = 4 // Emitter errors occurred during emitting process } export interface EmitResult { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 5ee3139d8f..c227dac7bb 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -826,7 +826,7 @@ module Harness { totalErrorsReported++; } - // Report glovbal errors: + // Report global errors: var globalErrors = diagnostics.filter(err => !err.filename); globalErrors.forEach(err => outputErrorText(err)); @@ -1016,7 +1016,7 @@ module Harness { } export module TestCaseParser { - /** all the necesarry information to set the right compiler settings */ + /** all the necessary information to set the right compiler settings */ export interface CompilerSetting { flag: string; value: string; diff --git a/src/services/services.ts b/src/services/services.ts index c49615f678..722cab1d6a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -362,7 +362,7 @@ module ts { public update(scriptSnapshot: TypeScript.IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TypeScript.TextChangeRange): SourceFile { // See if we are currently holding onto a syntax tree. We may not be because we're // either a closed file, or we've just been lazy and haven't had to create the syntax - // tree yet. Access the field instead of the method so we don't accidently realize + // tree yet. Access the field instead of the method so we don't accidentally realize // the old syntax tree. var oldSyntaxTree = this.syntaxTree; @@ -1378,7 +1378,7 @@ module ts { var program: Program; // this checker is used to answer all LS questions except errors var typeInfoResolver: TypeChecker; - // the sole purpose of this checkes is to reutrn semantic diagnostics + // the sole purpose of this checker is to return semantic diagnostics // creation is deferred - use getFullTypeCheckChecker to get instance var fullTypeCheckChecker_doNotAccessDirectly: TypeChecker; var useCaseSensitivefilenames = false; @@ -1524,7 +1524,7 @@ module ts { sourceFile = documentRegistry.acquireDocument(filename, compilationSettings, scriptSnapshot, version, isOpen); } - // Remeber the new sourceFile + // Remember the new sourceFile sourceFilesByName[filename] = sourceFile; } @@ -1579,7 +1579,7 @@ module ts { var firstChar = displayName.charCodeAt(0); if (firstChar === TypeScript.CharacterCodes.singleQuote || firstChar === TypeScript.CharacterCodes.doubleQuote) { // If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an - // invalid identifer name. We need to check if whatever was inside the quotes is actually a valid identifier name. + // invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name. displayName = TypeScript.stripStartAndEndQuotes(displayName); } @@ -1621,9 +1621,9 @@ module ts { } function isCompletionListBlocker(sourceUnit: TypeScript.SourceUnitSyntax, position: number): boolean { - // We shouldn't be getting a possition that is outside the file because + // We shouldn't be getting a position that is outside the file because // isEntirelyInsideComment can't handle when the position is out of bounds, - // callers should be fixed, however we should be resiliant to bad inputs + // callers should be fixed, however we should be resilient to bad inputs // so we return true (this position is a blocker for getting completions) if (position < 0 || position > TypeScript.fullWidth(sourceUnit)) { return true; @@ -1713,7 +1713,7 @@ module ts { var positionedToken = TypeScript.Syntax.findCompleteTokenOnLeft(sourceUnit, position, /*includeSkippedTokens*/true); if (positionedToken && position === TypeScript.end(positionedToken) && positionedToken.kind() == TypeScript.SyntaxKind.EndOfFileToken) { - // EndOfFile token is not intresting, get the one before it + // EndOfFile token is not interesting, get the one before it positionedToken = TypeScript. previousToken(positionedToken, /*includeSkippedTokens*/true); } @@ -1848,14 +1848,14 @@ module ts { // // get existing members // var existingMembers = compiler.getVisibleMemberSymbolsFromAST(node, document); - // // Add filtterd items to the completion list + // // Add filtered items to the completion list // getCompletionEntriesFromSymbols({ // symbols: filterContextualMembersList(contextualMembers.symbols, existingMembers, filename, position), // enclosingScopeSymbol: contextualMembers.enclosingScopeSymbol // }, entries); //} } - // Get scope memebers + // Get scope members else { isMemberCompletion = false; /// TODO filter meaning based on the current context @@ -2333,7 +2333,7 @@ module ts { // Could not find a symbol e.g. unknown identifier if (!symbol) { - // Even if we did not find a symbol, we have an identifer, so there is at least + // Even if we did not find a symbol, we have an identifier, so there is at least // one reference that we know of. return than instead of undefined. return [getReferenceEntry(node)]; } @@ -2599,7 +2599,7 @@ module ts { var propertySymbol = typeReferenceSymbol.members[propertyName]; if (propertySymbol) result.push(typeReferenceSymbol.members[propertyName]); - // Visit the typeReference as well to see if it directelly or indirectelly use that property + // Visit the typeReference as well to see if it directly or indirectly use that property getPropertySymbolsFromBaseTypes(typeReferenceSymbol, propertyName, result); } } @@ -2607,7 +2607,7 @@ module ts { } function isRelatableToSearchSet(searchSymbols: Symbol[], referenceSymbol: Symbol, referenceLocation: Node): boolean { - // Unwrap symbols to get to the root (e.g. triansient symbols as a result of widenning) + // Unwrap symbols to get to the root (e.g. transient symbols as a result of widening) var referenceSymbolTarget = typeInfoResolver.getRootSymbol(referenceSymbol); // if it is in the list, then we are done @@ -2625,7 +2625,7 @@ module ts { } } - // Finally, try all properties with the same name in any type the containing type extened or implemented, and + // Finally, try all properties with the same name in any type the containing type extended or implemented, and // see if any is in the list if (referenceSymbol.parent && referenceSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { var result: Symbol[] = []; @@ -2781,7 +2781,7 @@ module ts { // intersects with the class in the value space. // To achieve that we will keep iterating until the result stabilizes. - // Remeber the last meaning + // Remember the last meaning var lastIterationMeaning = meaning; for (var i = 0, n = declarations.length; i < n; i++) { @@ -2796,7 +2796,7 @@ module ts { return meaning; } - /// A node is considedered a writeAccess iff it is a name of a declaration or a target of an assignment + /// A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment function isWriteAccess(node: Node): boolean { if (node.kind === SyntaxKind.Identifier && isDeclarationOrFunctionExpressionOrCatchVariableName(node)) { return true; @@ -2873,7 +2873,7 @@ module ts { var emitFilesResult = getFullTypeCheckChecker().emitFiles(); emitOutput.emitOutputStatus = emitFilesResult.emitResultStatus; - // Reset writer back to underfined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in getEmitOutput + // Reset writer back to undefined to make sure that we produce an error message if CompilerHost.writeFile method is called when we are not in getEmitOutput this.writer = undefined; return emitOutput; } @@ -3154,7 +3154,7 @@ module ts { continue; } - // Looks to be within the trivia. See if we can find hte comment containing it. + // Looks to be within the trivia. See if we can find the comment containing it. var triviaList = matchPosition < TypeScript.start(token) ? token.leadingTrivia(syntaxTree.text) : token.trailingTrivia(syntaxTree.text); var trivia = findContainingComment(triviaList, matchPosition); if (trivia === null) { @@ -3362,7 +3362,7 @@ module ts { addResult(start - lastTokenOrCommentEnd, TokenClass.Whitespace); } - // Remeber the end of the last token + // Remember the end of the last token lastTokenOrCommentEnd = end; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 605308d7b5..4f622d7a21 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -147,13 +147,13 @@ module ts { getDefaultCompilationSettings(): string; } - /// TODO: delete this, it is only needed untill the VS interface is updated + /// TODO: delete this, it is only needed until the VS interface is updated enum LanguageVersion { EcmaScript3 = 0, EcmaScript5 = 1, } - enum ModuleGenTarget { + export enum ModuleGenTarget { Unspecified = 0, Synchronous = 1, Asynchronous = 2, @@ -188,9 +188,9 @@ module ts { if (typeof languageVersion === "undefined") return undefined; switch (languageVersion) { - case LanguageVersion.EcmaScript3: return ScriptTarget.ES3; + case LanguageVersion.EcmaScript3: return ScriptTarget.ES3 case LanguageVersion.EcmaScript5: return ScriptTarget.ES5; - default: throw Error("unsuported LanguageVersion value: " + languageVersion); + default: throw Error("unsupported LanguageVersion value: " + languageVersion); } } @@ -201,7 +201,7 @@ module ts { case ModuleGenTarget.Asynchronous: return ModuleKind.AMD; case ModuleGenTarget.Synchronous: return ModuleKind.CommonJS; case ModuleGenTarget.Unspecified: return ModuleKind.None; - default: throw Error("unsuported ModuleGenTarget value: " + moduleGenTarget); + default: throw Error("unsupported ModuleGenTarget value: " + moduleGenTarget); } } @@ -211,7 +211,7 @@ module ts { switch (scriptTarget) { case ScriptTarget.ES3: return LanguageVersion.EcmaScript3; case ScriptTarget.ES5: return LanguageVersion.EcmaScript5; - default: throw Error("unsuported ScriptTarget value: " + scriptTarget); + default: throw Error("unsupported ScriptTarget value: " + scriptTarget); } } @@ -222,7 +222,7 @@ module ts { case ModuleKind.AMD: return ModuleGenTarget.Asynchronous; case ModuleKind.CommonJS: return ModuleGenTarget.Synchronous; case ModuleKind.None: return ModuleGenTarget.Unspecified; - default: throw Error("unsuported ModuleKind value: " + moduleKind); + default: throw Error("unsupported ModuleKind value: " + moduleKind); } } @@ -326,8 +326,8 @@ module ts { /// TODO: this should be pushed into VS. /// We can not ask the LS instance to resolve, as this will lead to asking the host about files it does not know about, - /// something it is not desinged to handle. for now make sure we never get a "noresolve == false". - /// This value should not matter, as the host runs resolution logic independentlly + /// something it is not designed to handle. for now make sure we never get a "noresolve == false". + /// This value should not matter, as the host runs resolution logic independently options.noResolve = true; return options; @@ -432,7 +432,7 @@ module ts { } // DISPOSE - // Ensure (almost) determinstic release of internal Javascript resources when + // Ensure (almost) deterministic release of internal Javascript resources when // some external native objects holds onto us (e.g. Com/Interop). public dispose(dummy: any): void { this.logger.log("dispose()"); @@ -859,7 +859,7 @@ module ts { } -/// TODO: this is used by VS, clean this up on both sides of the interfrace +/// TODO: this is used by VS, clean this up on both sides of the interface module TypeScript.Services { export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory; } From 609d1bc92c55f85881637f4dfbdc8208a0c21b8d Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 9 Sep 2014 17:42:53 -0700 Subject: [PATCH 19/79] Chage test framework from manual comparing the result to using baseline; Add compilerOptions into fourslash --- src/harness/fourslash.ts | 110 ++++++++++------ tests/cases/fourslash/fourslash.d.ts | 179 +++++++++++++++++++++++++++ tests/cases/fourslash/fourslash.ts | 8 +- 3 files changed, 255 insertions(+), 42 deletions(-) create mode 100644 tests/cases/fourslash/fourslash.d.ts diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index c7b0443c2c..8693ef6b2b 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -130,13 +130,15 @@ module FourSlash { outDir: 'outDir', declaration: 'declaration', sourceMap: 'sourceMap', - sourceRoot: 'sourceRoot' + sourceRoot: 'sourceRoot', + mapRoot: 'mapRoot', + module: 'module', }; // List of allowed metadata names var fileMetadataNames = ['Filename']; var globalMetadataNames = ['BaselineFile', compilerOptMetadataNames.out, compilerOptMetadataNames.outDir, compilerOptMetadataNames.declaration, compilerOptMetadataNames.outDir, - compilerOptMetadataNames.declaration, compilerOptMetadataNames.sourceMap, compilerOptMetadataNames.sourceRoot] + compilerOptMetadataNames.declaration, compilerOptMetadataNames.sourceMap, compilerOptMetadataNames.sourceRoot, compilerOptMetadataNames.mapRoot, compilerOptMetadataNames.module] function convertGlobalOptionsToCompilationSettings(globalOptions: { [idx: string]: string }): ts.CompilationSettings { var settings: ts.CompilationSettings = {}; @@ -156,8 +158,26 @@ module FourSlash { case compilerOptMetadataNames.sourceMap: settings.mapSourceFiles = true; break; - case compilerOptMetadataNames.sourceRoot: - settings.sourceRoot = globalOptions[prop] + case compilerOptMetadataNames.sourceRoot: + settings.sourceRoot = globalOptions[prop]; + break; + case compilerOptMetadataNames.mapRoot: + settings.mapRoot = globalOptions[prop]; + break; + case compilerOptMetadataNames.module: + // create appropriate external module target for CompilationSettings + switch (globalOptions[prop]) { + case "AMD": + settings.moduleGenTarget = ts.ModuleGenTarget.Asynchronous; + break; + case "CommonJS": + settings.moduleGenTarget = ts.ModuleGenTarget.Synchronous; + break; + default: + settings.moduleGenTarget = ts.ModuleGenTarget.Unspecified; + break; + } + break; } } } @@ -494,40 +514,6 @@ module FourSlash { } } - public verifyEmitOutput(state: ts.EmitReturnStatus, filename?: string) { - var expectedFilenames:string[] = []; - if (filename !== undefined) { - expectedFilenames = filename.split(" "); - } - - var emit = this.languageService.getEmitOutput(this.activeFile.fileName); - - if (emit.emitOutputStatus !== state) { - throw new Error("Expected emitOutputResult '" + state + "', but actual emitOutputResult '" + emit.emitOutputStatus + "'"); - } - - var passed = true; - if (emit.outputFiles.length > 0) { - passed = expectedFilenames.every(expectedFilename => { - return emit.outputFiles.some(outputFile => { - return outputFile.name === expectedFilename; - }); - }); - } - - if (!passed) { - var errorMessage = "Expected outputFilename '" + filename + "', but actual outputFilename '"; - emit.outputFiles.forEach((outputFile, idx, array) => { - errorMessage += outputFile.name; - if (idx !== emit.outputFiles.length - 1) { - errorMessage += " "; - } - }); - errorMessage += "'"; - throw new Error(errorMessage); - } - } - public verifyMemberListContains(symbol: string, type?: string, docComment?: string, fullSymbolName?: string, kind?: string) { this.scenarioActions.push(''); this.scenarioActions.push(''); @@ -964,6 +950,54 @@ module FourSlash { true /* run immediately */); } + public baselineGetEmitOutput() { + this.taoInvalidReason = 'baselineCurrentFileBreakpointLocations impossible'; + + Harness.Baseline.runBaseline( + "Breakpoint Locations for " + this.activeFile.fileName, + this.testData.globalOptions['BaselineFile'], + () => { + var emitOutput = this.languageService.getEmitOutput(this.activeFile.fileName); + var emitOutputStatus = emitOutput.emitOutputStatus; + var resultString = ""; + + // Print emitOutputStatus in readable format + switch (emitOutputStatus) { + case ts.EmitReturnStatus.Succeeded: + resultString += "EmitOutputStatus : Succeeded\n"; + break; + case ts.EmitReturnStatus.AllOutputGenerationSkipped: + resultString += "EmitOutputStatus : AllOutputGenerationSkipped\n"; + break; + case ts.EmitReturnStatus.JSGeneratedWithSemanticErrors: + resultString += "EmitOutputStatus : JSGeneratedWithSemanticErrors\n"; + break; + case ts.EmitReturnStatus.DeclarationGenerationSkipped: + resultString += "EmitOutputStatus : DeclaratiionGenerationSkipped\n"; + break; + case ts.EmitReturnStatus.EmitErrorsEncountered: + resultString += "EmitOutputStatus : EmitErrorEncountered\n"; + break; + default: + resultString += "Invalid EmitOutputStatus\n"; + break; + } + + emitOutput.outputFiles.forEach((outputFile, idx, array) => { + var filename = "Filename : " + outputFile.name + "\n"; + if (filename.match("/*.js.map/") === undefined) { + var content = outputFile.text; + } + else { + var content = outputFile.text + "\n"; + } + resultString = resultString + filename + content + "\n"; + }); + return resultString; + }, + true /* run immediately */); + } + public printBreakpointLocation(pos: number) { Harness.IO.log(this.getBreakpointStatementLocation(pos)); } diff --git a/tests/cases/fourslash/fourslash.d.ts b/tests/cases/fourslash/fourslash.d.ts new file mode 100644 index 0000000000..b3ad5e000d --- /dev/null +++ b/tests/cases/fourslash/fourslash.d.ts @@ -0,0 +1,179 @@ +declare var FourSlash: any; +declare enum IncrementalEditValidation { + None, + SyntacticOnly, + Complete, +} +declare enum TypingFidelity { + /** Performs typing and formatting (if formatting is enabled) */ + Low, + /** Performs typing, checks completion lists, signature help, and formatting (if enabled) */ + High, +} +declare enum EmitReturnStatus { + Succeeded = 0, + AllOutputGenerationSkipped = 1, + JSGeneratedWithSemanticErrors = 2, + DeclarationGenerationSkipped = 3, + EmitErrorsEncountered = 4, +} +declare module FourSlashInterface { + interface Marker { + fileName: string; + position: number; + data?: any; + } + interface Range { + fileName: string; + start: number; + end: number; + marker?: Marker; + } + interface TextSpan { + start: number; + end: number; + } + class test_ { + markers(): Marker[]; + ranges(): Range[]; + } + class diagnostics { + validateTypeAtCurrentPosition(): any; + validateTypesAtPositions(...positions: number[]): any; + setEditValidation(validation: IncrementalEditValidation): void; + setTypingFidelity(fidelity: TypingFidelity): void; + } + class goTo { + marker(name?: string): void; + bof(): void; + eof(): void; + definition(definitionIndex?: number): void; + position(position: number, fileIndex?: number): any; + position(position: number, fileName?: string): any; + file(index: number): any; + file(name: string): any; + } + class verifyNegatable { + private negative; + not: verifyNegatable; + constructor(negative?: boolean); + memberListContains(symbol: string, type?: string, docComment?: string, fullSymbolName?: string, kind?: string): void; + memberListCount(expectedCount: number): void; + completionListContains(symbol: string, type?: string, docComment?: string, fullSymbolName?: string, kind?: string): void; + completionListItemsCountIsGreaterThan(count: number): void; + completionListIsEmpty(): void; + memberListIsEmpty(): void; + referencesCountIs(count: number): void; + referencesAtPositionContains(range: Range, isWriteAccess?: boolean): void; + implementorsCountIs(count: number): void; + currentParameterIsVariable(): void; + signatureHelpPresent(): void; + errorExistsBetweenMarkers(startMarker: string, endMarker: string): void; + errorExistsAfterMarker(markerName?: string): void; + errorExistsBeforeMarker(markerName?: string): void; + quickInfoIs(typeName?: string, docComment?: string, symbolName?: string, kind?: string): void; + quickInfoSymbolNameIs(symbolName: any): void; + quickInfoExists(): void; + definitionLocationExists(): void; + } + class verify extends verifyNegatable { + caretAtMarker(markerName?: string): void; + indentationIs(numberOfSpaces: number): void; + indentationAtPositionIs(fileName: string, position: number, numberOfSpaces: number): void; + textAtCaretIs(text: string): void; + /** + Compiles the current file and evaluates 'expr' in a context containing + the emitted output, then compares (using ===) the result of that expression + to 'value'. Do not use this function with external modules as it is not supported. + */ + eval(expr: string, value: any): void; + emitOutput(expectedState: EmitReturnStatus, expectedFilename?: string): void; + currentLineContentIs(text: string): void; + currentFileContentIs(text: string): void; + currentParameterHelpArgumentNameIs(name: string): void; + currentParameterSpanIs(parameter: string): void; + currentParameterHelpArgumentDocCommentIs(docComment: string): void; + currentSignatureHelpDocCommentIs(docComment: string): void; + signatureHelpCountIs(expected: number): void; + currentSignatureParamterCountIs(expected: number): void; + currentSignatureTypeParamterCountIs(expected: number): void; + currentSignatureHelpIs(expected: string): void; + numberOfErrorsInCurrentFile(expected: number): void; + baselineCurrentFileBreakpointLocations(): void; + baselineCurrentFileNameOrDottedNameSpans(): void; + nameOrDottedNameSpanTextIs(text: string): void; + outliningSpansInCurrentFile(spans: TextSpan[]): void; + todoCommentsInCurrentFile(descriptors: string[]): void; + matchingBracePositionInCurrentFile(bracePosition: number, expectedMatchPosition: number): void; + noMatchingBracePositionInCurrentFile(bracePosition: number): void; + setVerifyDocComments(val: boolean): void; + getScriptLexicalStructureListCount(count: number): void; + getScriptLexicalStructureListContains(name: string, kind: string, fileName?: string, parentName?: string, isAdditionalSpan?: boolean, markerPosition?: number): void; + navigationItemsListCount(count: number, searchValue: string, matchKind?: string): void; + navigationItemsListContains(name: string, kind: string, searchValue: string, matchKind: string, fileName?: string, parenetName?: string): void; + occurrencesAtPositionContains(range: Range, isWriteAccess?: boolean): void; + occurrencesAtPositionCount(expectedCount: number): void; + completionEntryDetailIs(entryName: string, type: string, docComment?: string, fullSymbolName?: string, kind?: string): void; + } + class edit { + backspace(count?: number): void; + deleteAtCaret(times?: number): void; + replace(start: number, length: number, text: string): void; + paste(text: string): void; + insert(text: string): void; + insertLine(text: string): void; + insertLines(...lines: string[]): void; + moveRight(count?: number): void; + moveLeft(count?: number): void; + enableFormatting(): void; + disableFormatting(): void; + } + class debug { + printCurrentParameterHelp(): void; + printCurrentFileState(): void; + printCurrentFileStateWithWhitespace(): void; + printCurrentFileStateWithoutCaret(): void; + printCurrentQuickInfo(): void; + printCurrentSignatureHelp(): void; + printMemberListMembers(): void; + printCompletionListMembers(): void; + printBreakpointLocation(pos: number): void; + printBreakpointAtCurrentLocation(): void; + printNameOrDottedNameSpans(pos: number): void; + printErrorList(): void; + printNavigationItems(searchValue?: string): void; + printScriptLexicalStructureItems(): void; + printReferences(): void; + printContext(): void; + } + class format { + document(): void; + selection(startMarker: string, endMarker: string): void; + setOption(name: string, value: number): any; + setOption(name: string, value: string): any; + setOption(name: string, value: boolean): any; + } + class cancellation { + resetCancelled(): void; + setCancelled(numberOfCalls?: number): void; + } +} +declare module fs { + var test: FourSlashInterface.test_; + var goTo: FourSlashInterface.goTo; + var verify: FourSlashInterface.verify; + var edit: FourSlashInterface.edit; + var debug: FourSlashInterface.debug; + var format: FourSlashInterface.format; + var diagnostics: FourSlashInterface.diagnostics; + var cancellation: FourSlashInterface.cancellation; +} +declare function verifyOperationIsCancelled(f: any): void; +declare var test: FourSlashInterface.test_; +declare var goTo: FourSlashInterface.goTo; +declare var verify: FourSlashInterface.verify; +declare var edit: FourSlashInterface.edit; +declare var debug: FourSlashInterface.debug; +declare var format: FourSlashInterface.format; +declare var diagnostics: FourSlashInterface.diagnostics; +declare var cancellation: FourSlashInterface.cancellation; diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 577d2f4dc0..1492492eae 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -266,10 +266,6 @@ module FourSlashInterface { FourSlash.currentTestState.verifyEval(expr, value); } - public emitOutput(expectedState: EmitReturnStatus, expectedFilename?: string) { - FourSlash.currentTestState.verifyEmitOutput(expectedState, expectedFilename); - } - public currentLineContentIs(text: string) { FourSlash.currentTestState.verifyCurrentLineContent(text); } @@ -322,6 +318,10 @@ module FourSlashInterface { FourSlash.currentTestState.baselineCurrentFileNameOrDottedNameSpans(); } + public baselineGetEmitOutput() { + FourSlash.currentTestState.baselineGetEmitOutput(); + } + public nameOrDottedNameSpanTextIs(text: string) { FourSlash.currentTestState.verifyCurrentNameOrDottedNameSpanText(text); } From 4a1f652b66a7563e2c9e13646c34d73715c9a430 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 9 Sep 2014 17:43:10 -0700 Subject: [PATCH 20/79] Update testcases to use baseline --- .../getEmitOutputDeclarationMultiFiles.ts | 6 ++-- .../getEmitOutputDeclarationSingleFile.ts | 7 ++-- tests/cases/fourslash/getEmitOutputMapRoot.ts | 14 ++++++++ .../cases/fourslash/getEmitOutputNoErrors.ts | 5 +-- .../fourslash/getEmitOutputSingleFile.ts | 6 ++-- .../fourslash/getEmitOutputSingleFile2.ts | 32 +++++++++++++++++++ .../cases/fourslash/getEmitOutputSourceMap.ts | 13 ++++++++ .../fourslash/getEmitOutputSourceMap2.ts | 25 +++++++++++++++ .../fourslash/getEmitOutputSourceRoot.ts | 14 ++++++++ .../fourslash/getEmitOutputSourceRoot2.ts | 21 ++++++++++++ .../getEmitOutputWithEmitterErrors.ts | 13 ++++++++ .../getEmitOutputWithEmitterErrors2.ts | 12 +++++++ .../getEmitOutputWithSemanticErrors.ts | 6 ++-- .../getEmitOutputWithSemanticErrors2.ts | 6 ++-- .../getEmitOutputWithSyntaxErrors.ts | 5 +-- .../getEmitOutputWithSyntaxErrors2.ts | 10 ------ 16 files changed, 163 insertions(+), 32 deletions(-) create mode 100644 tests/cases/fourslash/getEmitOutputMapRoot.ts create mode 100644 tests/cases/fourslash/getEmitOutputSingleFile2.ts create mode 100644 tests/cases/fourslash/getEmitOutputSourceMap.ts create mode 100644 tests/cases/fourslash/getEmitOutputSourceMap2.ts create mode 100644 tests/cases/fourslash/getEmitOutputSourceRoot.ts create mode 100644 tests/cases/fourslash/getEmitOutputSourceRoot2.ts create mode 100644 tests/cases/fourslash/getEmitOutputWithEmitterErrors.ts create mode 100644 tests/cases/fourslash/getEmitOutputWithEmitterErrors2.ts delete mode 100644 tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts diff --git a/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts b/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts index 5e2941f04f..942a48a4c7 100644 --- a/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts +++ b/tests/cases/fourslash/getEmitOutputDeclarationMultiFiles.ts @@ -1,5 +1,6 @@ /// +// @BaselineFile: getEmitOutputDeclarationMultiFiles.baseline // @declaration: true // @Filename: inputFile1.ts //// var x: number = 5; @@ -15,7 +16,4 @@ //// y : number; //// } -var inputFile1 = "tests/cases/fourslash/inputFile1"; -var inputFile2 = "tests/cases/fourslash/inputFile2"; -var outputFilenames = inputFile1 + ".js" + " " + inputFile2 + ".js" + " " + inputFile1 + ".d.ts" + " " + inputFile2 + ".d.ts"; -verify.emitOutput(EmitReturnStatus.Succeeded); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts b/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts index 92acfda441..788519d0ea 100644 --- a/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts +++ b/tests/cases/fourslash/getEmitOutputDeclarationSingleFile.ts @@ -1,5 +1,6 @@ /// +// @BaselineFile: getEmitOutputDeclarationSingleFile.baseline // @declaration: true // @Filename: inputFile1.ts // @out: declSingleFile.js @@ -16,8 +17,4 @@ //// y : number; //// } -var singleFilename = "declSingleFile"; -var jsFilename = singleFilename + ".js"; -var declFilename = singleFilename + ".d.ts"; -var outputFilenames = jsFilename + " " + declFilename; -verify.emitOutput(EmitReturnStatus.Succeeded, outputFilenames); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputMapRoot.ts b/tests/cases/fourslash/getEmitOutputMapRoot.ts new file mode 100644 index 0000000000..439c1e2037 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputMapRoot.ts @@ -0,0 +1,14 @@ +/// + +// @BaselineFile: getEmitOutputMapRoots.baseline +// @Filename: inputFile.ts +// @sourceMap: true +// @mapRoot: mapRootDir/ +//// var x = 109; +//// var foo = "hello world"; +//// class M { +//// x: number; +//// y: string; +//// } + +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputNoErrors.ts b/tests/cases/fourslash/getEmitOutputNoErrors.ts index a2b2797ed6..955b1b7703 100644 --- a/tests/cases/fourslash/getEmitOutputNoErrors.ts +++ b/tests/cases/fourslash/getEmitOutputNoErrors.ts @@ -1,10 +1,11 @@ /// -// @Filename: noErrorsResult.ts +// @BaselineFile: getEmitOutputNoErrors.baseline +// @Filename: inputFile.ts //// var x; //// class M { //// x: number; //// y: string; //// } -verify.emitOutput(EmitReturnStatus.Succeeded, "tests/cases/fourslash/noErrorsResult.js"); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSingleFile.ts b/tests/cases/fourslash/getEmitOutputSingleFile.ts index d273af02b8..eccb8ce5cb 100644 --- a/tests/cases/fourslash/getEmitOutputSingleFile.ts +++ b/tests/cases/fourslash/getEmitOutputSingleFile.ts @@ -1,6 +1,7 @@ /// -// @out: tests/cases/fourslash/singleFile.js +// @BaselineFile: getEmitOutputSingleFile.baseline +// @out: outputDir/singleFile.js // @Filename: inputFile1.ts //// var x: any; //// class Bar { @@ -15,5 +16,4 @@ //// y : number //// } -var outputFilename = "tests/cases/fourslash/singleFile.js"; -verify.emitOutput(EmitReturnStatus.Succeeded, outputFilename); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSingleFile2.ts b/tests/cases/fourslash/getEmitOutputSingleFile2.ts new file mode 100644 index 0000000000..c54ad22cc4 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputSingleFile2.ts @@ -0,0 +1,32 @@ +/// + +// @BaselineFile: getEmitOutputSingleFile2.baseline +// @declaration: true +// @Filename: inputFile1.ts +// @out: declSingleFile.js +// @outDir: tests/cases/fourslash/ +//// var x: number = 5; +//// class Bar { +//// x : string; +//// y : number +//// } + +// @Filename: inputFile2.ts +//// var x1: string = "hello world"; +//// class Foo{ +//// x : string; +//// y : number; +//// } + +// @Filename: inputFile3.ts +////export var foo = 10; +////export var bar = "hello world" + +var singleFilename = "declSingleFile"; +var jsFilename = singleFilename + ".js"; +var declFilename = singleFilename + ".d.ts"; +var exportFilename = "tests/cases/fourslash/inputFile3" +var exportJSFilename = exportFilename + ".js"; +var exportDeclFilename = exportFilename + ".d.ts"; +var outputFilenames = jsFilename + " " + declFilename + " " + exportJSFilename + " " + exportDeclFilename; +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSourceMap.ts b/tests/cases/fourslash/getEmitOutputSourceMap.ts new file mode 100644 index 0000000000..753ac77a29 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputSourceMap.ts @@ -0,0 +1,13 @@ +/// + +// @BaselineFile: getEmitOutputSourceMap.baseline +// @sourceMap: true +// @Filename: inputFile.ts +//// var x = 109; +//// var foo = "hello world"; +//// class M { +//// x: number; +//// y: string; +//// } + +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSourceMap2.ts b/tests/cases/fourslash/getEmitOutputSourceMap2.ts new file mode 100644 index 0000000000..bc29c48eac --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputSourceMap2.ts @@ -0,0 +1,25 @@ +/// + +// @BaselineFile: getEmitOutputSourceMap2.baseline +// @sourceMap: true +// @Filename: inputFile1.ts +// @outDir: sample/outDir +//// var x = 109; +//// var foo = "hello world"; +//// class M { +//// x: number; +//// y: string; +//// } + +// @Filename: inputFile2.ts +//// var intro = "hello world"; +//// if (intro !== undefined) { +//// var k = 10; +//// } + +var filename = "sample/outDir/sourceMapResult"; +var jsFilename = filename + ".js"; +var sourceMapFilename = filename + ".js.map"; +var outputFilenames = jsFilename + " " + sourceMapFilename; +verify.baselineGetEmitOutput(); +//verify.emitOutput(EmitReturnStatus.Succeeded, outputFilenames); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSourceRoot.ts b/tests/cases/fourslash/getEmitOutputSourceRoot.ts new file mode 100644 index 0000000000..c71015c17a --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputSourceRoot.ts @@ -0,0 +1,14 @@ +/// + +// @BaselineFile: getEmitOutputSourceRoot.baseline +// @sourceMap: true +// @Filename: inputFile.ts +// @sourceRoot: sourceRootDir/ +//// var x = 109; +//// var foo = "hello world"; +//// class M { +//// x: number; +//// y: string; +//// } + +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputSourceRoot2.ts b/tests/cases/fourslash/getEmitOutputSourceRoot2.ts new file mode 100644 index 0000000000..1596269ed6 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputSourceRoot2.ts @@ -0,0 +1,21 @@ +/// + +// @BaselineFile: getEmitOutputSourceRootMultiFiles.baseline +// @Filename: inputFile1.ts +// @sourceMap: true +// @sourceRoot: sourceRootDir/ +//// var x = 109; +//// var foo = "hello world"; +//// class M { +//// x: number; +//// y: string; +//// } + +// @Filename: inputFile2.ts +//// var bar = "hello world Typescript"; +//// class C { +//// x: number; +//// y: string[]; +//// } + +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithEmitterErrors.ts b/tests/cases/fourslash/getEmitOutputWithEmitterErrors.ts new file mode 100644 index 0000000000..78ab635a13 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputWithEmitterErrors.ts @@ -0,0 +1,13 @@ +/// + +// @BaselineFile: getEmitOutputWithEmitterErrors.baseline +// @declaration: true +// @Filename: inputFile.ts +////module M { +//// class C { } +//// export var foo = new C(); +////} + + +// Only generate javscript file. The semantic error should not affect it +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithEmitterErrors2.ts b/tests/cases/fourslash/getEmitOutputWithEmitterErrors2.ts new file mode 100644 index 0000000000..3a168143b8 --- /dev/null +++ b/tests/cases/fourslash/getEmitOutputWithEmitterErrors2.ts @@ -0,0 +1,12 @@ +/// + +// @BaselineFile: getEmitOutputWithEmitterErrors2.baseline +// @declaration: true +// @module: AMD +// @Filename: inputFile.ts +////class C { } +////export module M { +//// export var foo = new C(); +////} + +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts b/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts index fb9929e36d..9388148954 100644 --- a/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts +++ b/tests/cases/fourslash/getEmitOutputWithSemanticErrors.ts @@ -1,7 +1,7 @@ /// -// @Filename: semanticErrorsResult.ts +// @BaselineFile: getEmitOutputWithSemanticErrors.baseline +// @Filename: inputFile.ts //// var x:number = "hello world"; -// Only generate javscript file. The semantic error should not affect it -verify.emitOutput(EmitReturnStatus.JSGeneratedWithSemanticErrors,"tests/cases/fourslash/semanticErrorsResult.js"); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts b/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts index bc7aacc0c9..5499f979b5 100644 --- a/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts +++ b/tests/cases/fourslash/getEmitOutputWithSemanticErrors2.ts @@ -1,8 +1,8 @@ /// +// @BaselineFile: getEmitOutputWithSemanticErrors2.baseline // @declaration: true -// @Filename: semanticErrorsResult2.ts +// @Filename: inputFile.ts //// var x:number = "hello world"; -// Fail to generate .d.ts file due to semantic error but succeeded in generate javascript file -verify.emitOutput(EmitReturnStatus.DeclarationGenerationSkipped,"tests/cases/fourslash/semanticErrorsResult2.js"); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts index 655de166c9..81631b3d4d 100644 --- a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts +++ b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors.ts @@ -1,6 +1,7 @@ /// -// @Filename: getEmitOutputWithSyntaxErrorsResult.ts +// @BaselineFile: getEmitOutputWithSyntaxErrors.baseline +// @Filename: inputFile.ts //// var x: -verify.emitOutput(EmitReturnStatus.AllOutputGenerationSkipped); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file diff --git a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts b/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts deleted file mode 100644 index b74b7c9483..0000000000 --- a/tests/cases/fourslash/getEmitOutputWithSyntaxErrors2.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// - -// @declaration -// @Filename: syntaxErrorsResult2.ts -//// var x; -//// class M { -//// x : string; -//// y : numer - -verify.emitOutput(EmitReturnStatus.AllOutputGenerationSkipped); \ No newline at end of file From 9bbbdec0c222cad9fa132c3339bfbdd3f363eef1 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 9 Sep 2014 18:01:21 -0700 Subject: [PATCH 21/79] Check for repeating meta-data flag. --- src/harness/fourslash.ts | 4 ++++ tests/cases/fourslash/getEmitOutputSourceMap2.ts | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 8693ef6b2b..de78968028 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2147,6 +2147,10 @@ module FourSlash { currentFileOptions[match[1]] = match[2]; } } else { + // Check if the match is already existed in the global options + if (opts[match[1]] !== undefined) { + throw new Error("Global Option : '" + match[1] + "' is already existed"); + } opts[match[1]] = match[2]; } } diff --git a/tests/cases/fourslash/getEmitOutputSourceMap2.ts b/tests/cases/fourslash/getEmitOutputSourceMap2.ts index bc29c48eac..b3977095b8 100644 --- a/tests/cases/fourslash/getEmitOutputSourceMap2.ts +++ b/tests/cases/fourslash/getEmitOutputSourceMap2.ts @@ -17,9 +17,4 @@ //// var k = 10; //// } -var filename = "sample/outDir/sourceMapResult"; -var jsFilename = filename + ".js"; -var sourceMapFilename = filename + ".js.map"; -var outputFilenames = jsFilename + " " + sourceMapFilename; -verify.baselineGetEmitOutput(); -//verify.emitOutput(EmitReturnStatus.Succeeded, outputFilenames); \ No newline at end of file +verify.baselineGetEmitOutput(); \ No newline at end of file From d98a11e6f7858c26ed91188d3ab7e2813af87b30 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Sep 2014 11:54:10 -0700 Subject: [PATCH 22/79] Modified tests and added a test for labeled continues in a switch block. --- .../getOccurrencesLoopBreakContinue.ts | 2 ++ .../getOccurrencesLoopBreakContinue2.ts | 2 ++ .../getOccurrencesLoopBreakContinue3.ts | 1 + .../getOccurrencesLoopBreakContinue4.ts | 2 ++ .../getOccurrencesLoopBreakContinue5.ts | 2 ++ .../getOccurrencesSwitchCaseDefault.ts | 26 +++++++++---------- .../getOccurrencesSwitchCaseDefault2.ts | 21 +++++---------- .../getOccurrencesSwitchCaseDefault3.ts | 1 + .../getOccurrencesSwitchCaseDefault4.ts | 25 ++++++++++++++++++ 9 files changed, 54 insertions(+), 28 deletions(-) create mode 100644 tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts index aad909f973..81aaaed5c5 100644 --- a/tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue.ts @@ -65,6 +65,7 @@ test.ranges().forEach(r => { goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); @@ -72,6 +73,7 @@ test.ranges().forEach(r => { }); goTo.marker(); +verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); }); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts index cae9845e06..51d4d89b65 100644 --- a/tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue2.ts @@ -65,6 +65,7 @@ test.ranges().forEach(r => { goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); @@ -72,6 +73,7 @@ test.ranges().forEach(r => { }); goTo.marker(); +verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); }); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts index 571114ea15..8777c912af 100644 --- a/tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue3.ts @@ -65,6 +65,7 @@ test.ranges().forEach(r => { goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts index 587fb1a093..1bca62ba01 100644 --- a/tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue4.ts @@ -65,6 +65,7 @@ test.ranges().forEach(r => { goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); @@ -72,6 +73,7 @@ test.ranges().forEach(r => { }); goTo.marker(); +verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); }); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts b/tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts index d558e6f385..f4e62c554e 100644 --- a/tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts +++ b/tests/cases/fourslash/getOccurrencesLoopBreakContinue5.ts @@ -65,6 +65,7 @@ test.ranges().forEach(r => { goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); @@ -72,6 +73,7 @@ test.ranges().forEach(r => { }); goTo.marker(); +verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); }); \ No newline at end of file diff --git a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault.ts b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault.ts index a3d51e642d..f32ff0e8f8 100644 --- a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault.ts +++ b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault.ts @@ -1,10 +1,10 @@ /// -////[|sw/*1*/itch|] (10) { -//// [|/*2*/case|] 1: -//// [|cas/*3*/e|] 2: -//// [|c/*4*/ase|] 4: -//// [|c/*5*/ase|] 8: +////[|switch|] (10) { +//// [|case|] 1: +//// [|case|] 2: +//// [|case|] 4: +//// [|case|] 8: //// foo: switch (20) { //// case 1: //// case 2: @@ -12,18 +12,18 @@ //// default: //// break foo; //// } -//// [|cas/*6*/e|] 0xBEEF: -//// [|defa/*7*/ult|]: -//// [|bre/*9*/ak|]; -//// [|/*8*/case|] 16: +//// [|case|] 0xBEEF: +//// [|default|]: +//// [|break|]; +//// [|case|] 16: ////} -for (var i = 1; i <= test.markers().length; i++) { - goTo.marker("" + i); - verify.occurrencesAtPositionCount(9); +test.ranges().forEach(r => { + goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); }); -} +}); diff --git a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts index dc0db1f4b3..dd4577faa1 100644 --- a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts +++ b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault2.ts @@ -5,11 +5,11 @@ //// case 2: //// case 4: //// case 8: -//// foo: [|swi/*1*/tch|] (20) { -//// [|/*2*/case|] 1: -//// [|cas/*3*/e|] 2: -//// [|b/*4*/reak|]; -//// [|defaul/*5*/t|]: +//// foo: [|switch|] (20) { +//// [|case|] 1: +//// [|case|] 2: +//// [|break|]; +//// [|default|]: //// [|break|] foo; //// } //// case 0xBEEF: @@ -21,18 +21,9 @@ test.ranges().forEach(r => { goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); }); }); - - -for (var i = 1; i <= test.markers().length; i++) { - goTo.marker("" + i); - verify.occurrencesAtPositionCount(6); - - test.ranges().forEach(range => { - verify.occurrencesAtPositionContains(range, false); - }); -} diff --git a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts index 959ce9d993..24330ca191 100644 --- a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts +++ b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault3.ts @@ -18,6 +18,7 @@ test.ranges().forEach(r => { goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); test.ranges().forEach(range => { verify.occurrencesAtPositionContains(range, false); diff --git a/tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts new file mode 100644 index 0000000000..039009746d --- /dev/null +++ b/tests/cases/fourslash/getOccurrencesSwitchCaseDefault4.ts @@ -0,0 +1,25 @@ +/// + +////foo: [|switch|] (10) { +//// [|case|] 1: +//// [|case|] 2: +//// [|case|] 3: +//// [|break|]; +//// [|break|] foo; +//// co/*1*/ntinue; +//// contin/*2*/ue foo; +////} + +test.ranges().forEach(r => { + goTo.position(r.start); + verify.occurrencesAtPositionCount(test.ranges().length); + + test.ranges().forEach(range => { + verify.occurrencesAtPositionContains(range, false); + }); +}); + +test.markers().forEach(m => { + goTo.position(m.position); + verify.occurrencesAtPositionCount(0); +}); \ No newline at end of file From 0435c1408187e65b67d3a5d09147d5915f466466 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 3 Sep 2014 11:07:03 -0700 Subject: [PATCH 23/79] Add getEmitOutput and update call to getCurrentDirectory --- src/compiler/core.ts | 13 +++++++------ src/compiler/emitter.ts | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 4f50f31134..5207f4c7d8 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -383,11 +383,12 @@ module ts { return [path.substr(0, rootLength)].concat(normalizedParts); } - export function getNormalizedPathComponents(path: string, currentDirectory: string) { + export function getNormalizedPathComponents(path: string, getCurrentDirectory: ()=>string) { var path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { // If the path is not rooted it is relative to current directory + var currentDirectory = getCurrentDirectory(); path = combinePaths(normalizeSlashes(currentDirectory), path); rootLength = getRootLength(path); } @@ -443,18 +444,18 @@ module ts { } } - function getNormalizedPathOrUrlComponents(pathOrUrl: string, currentDirectory: string) { + function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: ()=>string) { if (isUrl(pathOrUrl)) { return getNormalizedPathComponentsOfUrl(pathOrUrl); } else { - return getNormalizedPathComponents(pathOrUrl, currentDirectory); + return getNormalizedPathComponents(pathOrUrl, getCurrentDirectory); } } - export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, isAbsolutePathAnUrl: boolean) { - var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); - var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); + export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, getCurrentDirectory: () => string, isAbsolutePathAnUrl: boolean) { + var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, getCurrentDirectory); + var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, getCurrentDirectory); if (directoryComponents.length > 1 && directoryComponents[directoryComponents.length - 1] === "") { // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name // that is ["test", "cases", ""] needs to be actually ["test", "cases"] diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6a7efc5dbc..f0883f9b6b 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -523,7 +523,7 @@ module ts { sourceMapData.sourceMapSources.push(getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.filename, - compilerHost.getCurrentDirectory(), + compilerHost.getCurrentDirectory, /*isAbsolutePathAnUrl*/ true)); sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; @@ -640,7 +640,7 @@ module ts { sourceMapData.jsSourceMappingURL = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizePath(jsFilePath)), // get the relative sourceMapDir path based on jsFilePath combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), // this is where user expects to see sourceMap - compilerHost.getCurrentDirectory(), + compilerHost.getCurrentDirectory, /*isAbsolutePathAnUrl*/ true); } else { @@ -3089,7 +3089,7 @@ module ts { declFileName = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizeSlashes(jsFilePath)), declFileName, - compilerHost.getCurrentDirectory(), + compilerHost.getCurrentDirectory, /*isAbsolutePathAnUrl*/ false); referencePathsOutput += "/// " + newLine; From 271bb29c94b584601e5b994d19d82045481f62b8 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 4 Sep 2014 15:08:50 -0700 Subject: [PATCH 24/79] Minor spelling and spacing fix --- src/compiler/core.ts | 4 ++-- tests/cases/fourslash/fourslash.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 5207f4c7d8..432ae6ab8c 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -383,7 +383,7 @@ module ts { return [path.substr(0, rootLength)].concat(normalizedParts); } - export function getNormalizedPathComponents(path: string, getCurrentDirectory: ()=>string) { + export function getNormalizedPathComponents(path: string, getCurrentDirectory: () => string) { var path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { @@ -444,7 +444,7 @@ module ts { } } - function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: ()=>string) { + function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: () => string) { if (isUrl(pathOrUrl)) { return getNormalizedPathComponentsOfUrl(pathOrUrl); } diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 1492492eae..836e139c61 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -54,7 +54,6 @@ enum EmitReturnStatus { EmitErrorsEncountered = 4 // Emitter errors occured during emitting process } - module FourSlashInterface { declare var FourSlash; From cf2214bba0a10e9768d6417cb9791baaac2f1a62 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 5 Sep 2014 16:15:12 -0700 Subject: [PATCH 25/79] Change getCurrentDirectory and getDefaultLibname from passing around function to its final value --- src/compiler/core.ts | 13 ++++++------- src/compiler/emitter.ts | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 432ae6ab8c..4f50f31134 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -383,12 +383,11 @@ module ts { return [path.substr(0, rootLength)].concat(normalizedParts); } - export function getNormalizedPathComponents(path: string, getCurrentDirectory: () => string) { + export function getNormalizedPathComponents(path: string, currentDirectory: string) { var path = normalizeSlashes(path); var rootLength = getRootLength(path); if (rootLength == 0) { // If the path is not rooted it is relative to current directory - var currentDirectory = getCurrentDirectory(); path = combinePaths(normalizeSlashes(currentDirectory), path); rootLength = getRootLength(path); } @@ -444,18 +443,18 @@ module ts { } } - function getNormalizedPathOrUrlComponents(pathOrUrl: string, getCurrentDirectory: () => string) { + function getNormalizedPathOrUrlComponents(pathOrUrl: string, currentDirectory: string) { if (isUrl(pathOrUrl)) { return getNormalizedPathComponentsOfUrl(pathOrUrl); } else { - return getNormalizedPathComponents(pathOrUrl, getCurrentDirectory); + return getNormalizedPathComponents(pathOrUrl, currentDirectory); } } - export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, getCurrentDirectory: () => string, isAbsolutePathAnUrl: boolean) { - var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, getCurrentDirectory); - var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, getCurrentDirectory); + export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, isAbsolutePathAnUrl: boolean) { + var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); + var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); if (directoryComponents.length > 1 && directoryComponents[directoryComponents.length - 1] === "") { // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name // that is ["test", "cases", ""] needs to be actually ["test", "cases"] diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f0883f9b6b..6a7efc5dbc 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -523,7 +523,7 @@ module ts { sourceMapData.sourceMapSources.push(getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.filename, - compilerHost.getCurrentDirectory, + compilerHost.getCurrentDirectory(), /*isAbsolutePathAnUrl*/ true)); sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; @@ -640,7 +640,7 @@ module ts { sourceMapData.jsSourceMappingURL = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizePath(jsFilePath)), // get the relative sourceMapDir path based on jsFilePath combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), // this is where user expects to see sourceMap - compilerHost.getCurrentDirectory, + compilerHost.getCurrentDirectory(), /*isAbsolutePathAnUrl*/ true); } else { @@ -3089,7 +3089,7 @@ module ts { declFileName = getRelativePathToDirectoryOrUrl( getDirectoryPath(normalizeSlashes(jsFilePath)), declFileName, - compilerHost.getCurrentDirectory, + compilerHost.getCurrentDirectory(), /*isAbsolutePathAnUrl*/ false); referencePathsOutput += "/// " + newLine; From 7ab51c6e2bc26942cbc3a9809aa414c0858990b0 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 9 Sep 2014 18:19:50 -0700 Subject: [PATCH 26/79] Merge from master --- src/compiler/emitter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6a7efc5dbc..3a38a78c07 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3104,7 +3104,7 @@ module ts { // All the references that are not going to be part of same file if ((referencedFile.flags & NodeFlags.DeclarationFile) || // This is a declare file reference - shouldEmitToOwnFile(referencedFile) || // This is referenced file is emitting its own js file + shouldEmitToOwnFile(referencedFile, compilerOptions) || // This is referenced file is emitting its own js file !addedGlobalFileReference) { // Or the global out file corresponding to this reference was not added writeReferencePath(referencedFile); From 7b0662be9edaa8941b390d64b2a0b6186cc7693a Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 10 Sep 2014 10:19:49 -0700 Subject: [PATCH 27/79] Remove getDirectory from LanguageServiceShimHost --- src/harness/harnessLanguageService.ts | 8 -------- src/services/services.ts | 2 -- 2 files changed, 10 deletions(-) diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index fdf246df9c..03c3436f9d 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -180,14 +180,6 @@ module Harness.LanguageService { throw new Error("No script with name '" + fileName + "'"); } - public getDefaultLibFilename(): string { - return undefined; - } - - public getCurrentDirectory(): string { - return undefined; - } - ////////////////////////////////////////////////////////////////////// // ILogger implementation // diff --git a/src/services/services.ts b/src/services/services.ts index 722cab1d6a..a110a4b963 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -417,8 +417,6 @@ module ts { getScriptSnapshot(fileName: string): TypeScript.IScriptSnapshot; getLocalizedDiagnosticMessages(): any; getCancellationToken(): CancellationToken; - getDefaultLibFilename(): string; - getCurrentDirectory(): string; } // From bf7e7b6cc2c624c91fa4ca35553cfb0ccadcf8bf Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 10 Sep 2014 15:57:01 -0700 Subject: [PATCH 28/79] Fix spelling --- tests/cases/fourslash/fourslash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 836e139c61..184059aa0e 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -51,7 +51,7 @@ enum EmitReturnStatus { AllOutputGenerationSkipped = 1, // No .js generated because of syntax errors, or compiler options errors, nothing generated JSGeneratedWithSemanticErrors = 2, // .js and .map generated with semantic errors DeclarationGenerationSkipped = 3, // .d.ts generation skipped because of semantic errors or declaration emitter specific errors; Output .js with semantic errors - EmitErrorsEncountered = 4 // Emitter errors occured during emitting process + EmitErrorsEncountered = 4 // Emitter errors occurred during emitting process } module FourSlashInterface { From 26fbb987bbdb65ce7c9b7dbc64a6050bde0cf031 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 10 Sep 2014 16:10:40 -0700 Subject: [PATCH 29/79] Remove getCurrentDirectory and getDefaultLibFilename from LanguageServiceShimHost --- src/services/shims.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/services/shims.ts b/src/services/shims.ts index 4f622d7a21..ba7c73d87e 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -53,8 +53,6 @@ module ts { getScriptSnapshot(fileName: string): ScriptSnapshotShim; getLocalizedDiagnosticMessages(): string; getCancellationToken(): CancellationToken; - getDefaultLibFilename(): string; - getCurrentDirectory(): string; } // @@ -367,14 +365,6 @@ module ts { public getCancellationToken(): CancellationToken { return this.shimHost.getCancellationToken(); } - - getDefaultLibFilename(): string { - return this.shimHost.getDefaultLibFilename(); - } - - getCurrentDirectory(): string { - return this.shimHost.getCurrentDirectory(); - } } function simpleForwardCall(logger: Logger, actionDescription: string, action: () => any): any { From dae34875b44895157c8a86b5d075a5f1bd08856f Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Sep 2014 17:38:02 -0700 Subject: [PATCH 30/79] Minor CR feedback addressed. --- src/compiler/checker.ts | 6 +++--- src/compiler/emitter.ts | 10 +++++----- src/compiler/parser.ts | 12 ++++++------ src/compiler/types.ts | 4 ++-- src/harness/typeWriter.ts | 4 ++-- src/services/services.ts | 29 +++++++++++++++-------------- 6 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 80778789e7..04ab6d4bc6 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5815,7 +5815,7 @@ module ts { }); } - function checkLabelledStatement(node: LabelledStatement) { + function checkLabelledStatement(node: LabeledStatement) { checkSourceElement(node.statement); } @@ -6378,8 +6378,8 @@ module ts { return checkWithStatement(node); case SyntaxKind.SwitchStatement: return checkSwitchStatement(node); - case SyntaxKind.LabelledStatement: - return checkLabelledStatement(node); + case SyntaxKind.LabeledStatement: + return checkLabelledStatement(node); case SyntaxKind.ThrowStatement: return checkThrowStatement(node); case SyntaxKind.TryStatement: diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 7634e6a778..7494b8f2b0 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -781,8 +781,8 @@ module ts { case SyntaxKind.ContinueStatement: case SyntaxKind.ExportAssignment: return false; - case SyntaxKind.LabelledStatement: - return (node.parent).label === node; + case SyntaxKind.LabeledStatement: + return (node.parent).label === node; case SyntaxKind.CatchBlock: return (node.parent).variable === node; } @@ -1200,7 +1200,7 @@ module ts { write(";"); } - function emitLabelledStatement(node: LabelledStatement) { + function emitLabelledStatement(node: LabeledStatement) { emit(node.label); write(": "); emit(node.statement); @@ -2080,8 +2080,8 @@ module ts { case SyntaxKind.CaseClause: case SyntaxKind.DefaultClause: return emitCaseOrDefaultClause(node); - case SyntaxKind.LabelledStatement: - return emitLabelledStatement(node); + case SyntaxKind.LabeledStatement: + return emitLabelledStatement(node); case SyntaxKind.ThrowStatement: return emitThrowStatement(node); case SyntaxKind.TryStatement: diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index a89152e043..d50da53b22 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -305,9 +305,9 @@ module ts { case SyntaxKind.DefaultClause: return child((node).expression) || children((node).statements); - case SyntaxKind.LabelledStatement: - return child((node).label) || - child((node).statement); + case SyntaxKind.LabeledStatement: + return child((node).label) || + child((node).statement); case SyntaxKind.ThrowStatement: return child((node).expression); case SyntaxKind.TryStatement: @@ -371,7 +371,7 @@ module ts { case SyntaxKind.SwitchStatement: case SyntaxKind.CaseClause: case SyntaxKind.DefaultClause: - case SyntaxKind.LabelledStatement: + case SyntaxKind.LabeledStatement: case SyntaxKind.TryStatement: case SyntaxKind.TryBlock: case SyntaxKind.CatchBlock: @@ -2799,8 +2799,8 @@ module ts { return isIdentifier() && lookAhead(() => nextToken() === SyntaxKind.ColonToken); } - function parseLabelledStatement(): LabelledStatement { - var node = createNode(SyntaxKind.LabelledStatement); + function parseLabelledStatement(): LabeledStatement { + var node = createNode(SyntaxKind.LabeledStatement); node.label = parseIdentifier(); parseExpected(SyntaxKind.ColonToken); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index fbd5d8b866..aa4b149a41 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -183,7 +183,7 @@ module ts { SwitchStatement, CaseClause, DefaultClause, - LabelledStatement, + LabeledStatement, ThrowStatement, TryStatement, TryBlock, @@ -459,7 +459,7 @@ module ts { statements: NodeArray; } - export interface LabelledStatement extends Statement { + export interface LabeledStatement extends Statement { label: Identifier; statement: Statement; } diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts index a3b23d10f1..0f88d9f0b1 100644 --- a/src/harness/typeWriter.ts +++ b/src/harness/typeWriter.ts @@ -67,8 +67,8 @@ class TypeWriterWalker { case ts.SyntaxKind.ContinueStatement: case ts.SyntaxKind.BreakStatement: return (parent).label === identifier; - case ts.SyntaxKind.LabelledStatement: - return (parent).label === identifier; + case ts.SyntaxKind.LabeledStatement: + return (parent).label === identifier; } return false; } diff --git a/src/services/services.ts b/src/services/services.ts index 00be1a7523..92da2d095b 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1276,8 +1276,8 @@ module ts { /// Helpers function getTargetLabel(referenceNode: Node, labelName: string): Identifier { while (referenceNode) { - if (referenceNode.kind === SyntaxKind.LabelledStatement && (referenceNode).label.text === labelName) { - return (referenceNode).label; + if (referenceNode.kind === SyntaxKind.LabeledStatement && (referenceNode).label.text === labelName) { + return (referenceNode).label; } referenceNode = referenceNode.parent; } @@ -1292,17 +1292,17 @@ module ts { function isLabelOfLabeledStatement(node: Node): boolean { return node.kind === SyntaxKind.Identifier && - node.parent.kind === SyntaxKind.LabelledStatement && - (node.parent).label === node; + node.parent.kind === SyntaxKind.LabeledStatement && + (node.parent).label === node; } /** * Whether or not a 'node' is preceded by a label of the given string. * Note: 'node' cannot be a SourceFile. */ - function isLabelledBy(node: Node, labelName: string) { - for (var owner = node.parent; owner.kind === SyntaxKind.LabelledStatement; owner = owner.parent) { - if ((owner).label.text === labelName) { + function isLabeledBy(node: Node, labelName: string) { + for (var owner = node.parent; owner.kind === SyntaxKind.LabeledStatement; owner = owner.parent) { + if ((owner).label.text === labelName) { return true; } } @@ -2372,13 +2372,13 @@ module ts { case SyntaxKind.WhileStatement: // The iteration statement is the owner if the break/continue statement is either unlabeled, // or if the break/continue statement's label corresponds to one of the loop's labels. - if (!breakOrContinueStatement.label || isLabelledBy(owner, breakOrContinueStatement.label.text)) { + if (!breakOrContinueStatement.label || isLabeledBy(owner, breakOrContinueStatement.label.text)) { return getLoopBreakContinueOccurrences(owner) } break; case SyntaxKind.SwitchStatement: // A switch statement can only be the owner of an break statement. - if (breakOrContinueStatement.kind === SyntaxKind.BreakStatement && (!breakOrContinueStatement.label || isLabelledBy(owner, breakOrContinueStatement.label.text))) { + if (breakOrContinueStatement.kind === SyntaxKind.BreakStatement && (!breakOrContinueStatement.label || isLabeledBy(owner, breakOrContinueStatement.label.text))) { return getSwitchCaseDefaultOccurrences(owner); } break; @@ -2398,7 +2398,10 @@ module ts { breakSearchType: BreakContinueSearchType, continueSearchType: BreakContinueSearchType, keywordAccumulator: Node[]): void { - (function aggregate(node: Node) { + + return aggregate(startPoint); + + function aggregate(node: Node): void { // Remember the statuses of the flags before diving into the next node. var prevBreakSearchType = breakSearchType; var prevContinueSearchType = continueSearchType; @@ -2432,9 +2435,7 @@ module ts { // Restore the last state. breakSearchType = prevBreakSearchType; continueSearchType = prevContinueSearchType; - })(startPoint); - - return; + }; } // Note: 'statement' must be a descendant of 'root'. @@ -2449,7 +2450,7 @@ module ts { continueSearchType; if (statement.label && (searchType & BreakContinueSearchType.Labeled)) { - return isLabelledBy(owner, statement.label.text); + return isLabeledBy(owner, statement.label.text); } else { return !!(searchType & BreakContinueSearchType.Unlabeled); From efed1f9acd37a18da96ed7ec6155c5011720d71d Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Wed, 10 Sep 2014 19:02:50 -0700 Subject: [PATCH 31/79] Simplified ownership code for continue/break statements. --- src/services/services.ts | 152 +++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 87 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 92da2d095b..bd2a67a38a 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -2331,11 +2331,13 @@ module ts { } } - aggregateBreakAndContinueKeywords(/* owner */ loopNode, - /* startPoint */ loopNode.statement, - /* breakSearchType */ BreakContinueSearchType.All, - /* continueSearchType */ BreakContinueSearchType.All, - /* keywordAccumulator */ keywords); + var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); + + forEach(breaksAndContinues, statement => { + if (ownsBreakOrContinueStatement(loopNode, statement)) { + pushKeywordIf(keywords, statement.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); + } + }); return map(keywords, getReferenceEntryFromNode); } @@ -2352,38 +2354,78 @@ module ts { forEach(switchStatement.clauses, clause => { pushKeywordIf(keywords, clause.getFirstToken(), SyntaxKind.CaseKeyword, SyntaxKind.DefaultKeyword); - // For each clause, aggregate each of the analogous 'break' statements. - aggregateBreakAndContinueKeywords(/* owner */ switchStatement, - /* startPoint */ clause, - /* breakSearchType */ BreakContinueSearchType.All, - /* continueSearchType */ BreakContinueSearchType.None, - /* keywordAccumulator */ keywords); + var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); + + forEach(breaksAndContinues, statement => { + if (ownsBreakOrContinueStatement(switchStatement, statement)) { + pushKeywordIf(keywords, statement.getFirstToken(), SyntaxKind.BreakKeyword); + } + }); }); return map(keywords, getReferenceEntryFromNode); } - function getBreakOrContinueStatementOccurences(breakOrContinueStatement: BreakOrContinueStatement): ReferenceEntry[] { - for (var owner = node.parent; owner; owner = owner.parent) { + function getBreakOrContinueStatementOccurences(breakOrContinueStatement: BreakOrContinueStatement): ReferenceEntry[]{ + var owner = getBreakOrContinueOwner(breakOrContinueStatement); + + if (owner) { switch (owner.kind) { case SyntaxKind.ForStatement: case SyntaxKind.ForInStatement: case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: - // The iteration statement is the owner if the break/continue statement is either unlabeled, - // or if the break/continue statement's label corresponds to one of the loop's labels. - if (!breakOrContinueStatement.label || isLabeledBy(owner, breakOrContinueStatement.label.text)) { - return getLoopBreakContinueOccurrences(owner) - } - break; + return getLoopBreakContinueOccurrences(owner) case SyntaxKind.SwitchStatement: - // A switch statement can only be the owner of an break statement. - if (breakOrContinueStatement.kind === SyntaxKind.BreakStatement && (!breakOrContinueStatement.label || isLabeledBy(owner, breakOrContinueStatement.label.text))) { - return getSwitchCaseDefaultOccurrences(owner); + return getSwitchCaseDefaultOccurrences(owner); + + } + } + + return undefined; + } + + function aggregateAllBreakAndContinueStatements(node: Node): BreakOrContinueStatement[] { + var statementAccumulator: BreakOrContinueStatement[] = [] + aggregate(node); + return statementAccumulator; + + function aggregate(node: Node): void { + if (node.kind === SyntaxKind.BreakStatement || node.kind === SyntaxKind.ContinueStatement) { + statementAccumulator.push(node); + } + // Do not cross function boundaries. + else if (!isAnyFunction(node)) { + forEachChild(node, aggregate); + } + }; + } + + function ownsBreakOrContinueStatement(owner: Node, statement: BreakOrContinueStatement): boolean { + var actualOwner = getBreakOrContinueOwner(statement); + + return actualOwner && actualOwner === owner; + } + + function getBreakOrContinueOwner(statement: BreakOrContinueStatement): Node { + for (var node = statement.parent; node; node = node.parent) { + switch (node.kind) { + case SyntaxKind.SwitchStatement: + if (statement.kind === SyntaxKind.ContinueStatement) { + continue; + } + // Fall through. + case SyntaxKind.ForStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.DoStatement: + if (!statement.label || isLabeledBy(node, statement.label.text)) { + return node; } break; default: - if (isAnyFunction(owner)) { + // Don't cross function boundaries. + if (isAnyFunction(node)) { return undefined; } break; @@ -2393,70 +2435,6 @@ module ts { return undefined; } - function aggregateBreakAndContinueKeywords(owner: Node, - startPoint: Node, - breakSearchType: BreakContinueSearchType, - continueSearchType: BreakContinueSearchType, - keywordAccumulator: Node[]): void { - - return aggregate(startPoint); - - function aggregate(node: Node): void { - // Remember the statuses of the flags before diving into the next node. - var prevBreakSearchType = breakSearchType; - var prevContinueSearchType = continueSearchType; - - switch (node.kind) { - case SyntaxKind.BreakStatement: - case SyntaxKind.ContinueStatement: - if (ownsBreakOrContinue(owner, node, breakSearchType, continueSearchType)) { - pushKeywordIf(keywordAccumulator, node.getFirstToken(), SyntaxKind.BreakKeyword, SyntaxKind.ContinueKeyword); - } - break; - - case SyntaxKind.ForStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.DoStatement: - case SyntaxKind.WhileStatement: - // Inner loops take ownership of unlabeled 'continue' statements. - continueSearchType &= ~BreakContinueSearchType.Unlabeled; - // Fall through - case SyntaxKind.SwitchStatement: - // Inner loops & 'switch' statements take ownership of unlabeled 'break' statements. - breakSearchType &= ~BreakContinueSearchType.Unlabeled; - break; - } - - // Do not cross function boundaries. - if (!isAnyFunction(node)) { - forEachChild(node, aggregate); - } - - // Restore the last state. - breakSearchType = prevBreakSearchType; - continueSearchType = prevContinueSearchType; - }; - } - - // Note: 'statement' must be a descendant of 'root'. - // Reasonable logic for restricting traversal prior to arriving at the - // 'statement' node is beyond the scope of this function. - function ownsBreakOrContinue(owner: Node, - statement: BreakOrContinueStatement, - breakSearchType: BreakContinueSearchType, - continueSearchType: BreakContinueSearchType): boolean { - var searchType = statement.kind === SyntaxKind.BreakStatement ? - breakSearchType : - continueSearchType; - - if (statement.label && (searchType & BreakContinueSearchType.Labeled)) { - return isLabeledBy(owner, statement.label.text); - } - else { - return !!(searchType & BreakContinueSearchType.Unlabeled); - } - } - // returns true if 'node' is defined and has a matching 'kind'. function hasKind(node: Node, kind: SyntaxKind) { return node !== undefined && node.kind === kind; From 24c40bb4bca66a12749473186874f4cc08b5c77b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 10 Sep 2014 23:13:41 -0700 Subject: [PATCH 32/79] added optional 'sourceFile' argument to methods of Node to avoid unnecesary tree walk --- src/compiler/parser.ts | 4 +-- src/services/services.ts | 62 ++++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index cfe27e7e7c..7e5ac13b8d 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -50,8 +50,8 @@ module ts { return node.pos; } - export function getTokenPosOfNode(node: Node): number { - return skipTrivia(getSourceFileOfNode(node).text, node.pos); + export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { + return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); } export function getSourceTextOfNodeFromSourceText(sourceText: string, node: Node): string { diff --git a/src/services/services.ts b/src/services/services.ts index 0069f53922..740bfb899b 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -27,18 +27,18 @@ module ts { export interface Node { getSourceFile(): SourceFile; - getChildCount(): number; - getChildAt(index: number): Node; - getChildren(): Node[]; - getStart(): number; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; getFullStart(): number; getEnd(): number; - getWidth(): number; + getWidth(sourceFile?: SourceFile): number; getFullWidth(): number; - getLeadingTriviaWidth(): number; - getFullText(): string; - getFirstToken(): Node; - getLastToken(): Node; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; } export interface Symbol { @@ -100,8 +100,8 @@ module ts { return node; } - public getStart(): number { - return getTokenPosOfNode(this); + public getStart(sourceFile?: SourceFile): number { + return getTokenPosOfNode(this, sourceFile); } public getFullStart(): number { @@ -112,20 +112,20 @@ module ts { return this.end; } - public getWidth(): number { - return this.getEnd() - this.getStart(); + public getWidth(sourceFile?: SourceFile): number { + return this.getEnd() - this.getStart(sourceFile); } public getFullWidth(): number { return this.end - this.getFullStart(); } - public getLeadingTriviaWidth(): number { - return this.getStart() - this.pos; + public getLeadingTriviaWidth(sourceFile?: SourceFile): number { + return this.getStart(sourceFile) - this.pos; } - public getFullText(): string { - return this.getSourceFile().text.substring(this.pos, this.end); + public getFullText(sourceFile?: SourceFile): string { + return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end); } private addSyntheticNodes(nodes: Node[], pos: number, end: number): number { @@ -157,9 +157,9 @@ module ts { return list; } - private createChildren() { + private createChildren(sourceFile?: SourceFile) { if (this.kind > SyntaxKind.Missing) { - scanner.setText(this.getSourceFile().text); + scanner.setText((sourceFile || this.getSourceFile()).text); var children: Node[] = []; var pos = this.pos; var processNode = (node: Node) => { @@ -185,36 +185,36 @@ module ts { this._children = children || emptyArray; } - public getChildCount(): number { - if (!this._children) this.createChildren(); + public getChildCount(sourceFile?: SourceFile): number { + if (!this._children) this.createChildren(sourceFile); return this._children.length; } - public getChildAt(index: number): Node { - if (!this._children) this.createChildren(); + public getChildAt(index: number, sourceFile?: SourceFile): Node { + if (!this._children) this.createChildren(sourceFile); return this._children[index]; } - public getChildren(): Node[] { - if (!this._children) this.createChildren(); + public getChildren(sourceFile?: SourceFile): Node[] { + if (!this._children) this.createChildren(sourceFile); return this._children; } - public getFirstToken(): Node { - var children = this.getChildren(); + public getFirstToken(sourceFile?: SourceFile): Node { + var children = this.getChildren(sourceFile); for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.kind < SyntaxKind.Missing) return child; - if (child.kind > SyntaxKind.Missing) return child.getFirstToken(); + if (child.kind > SyntaxKind.Missing) return child.getFirstToken(sourceFile); } } - public getLastToken(): Node { - var children = this.getChildren(); + public getLastToken(sourceFile?: SourceFile): Node { + var children = this.getChildren(sourceFile); for (var i = children.length - 1; i >= 0; i--) { var child = children[i]; if (child.kind < SyntaxKind.Missing) return child; - if (child.kind > SyntaxKind.Missing) return child.getLastToken(); + if (child.kind > SyntaxKind.Missing) return child.getLastToken(sourceFile); } } } From 641e659ffd61a15c4538c9e8bec0f2e0e69e36b7 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 11 Sep 2014 00:35:03 -0700 Subject: [PATCH 33/79] initial revision of SmartIndenter (TODO: indentation in list items) --- Jakefile | 5 +- src/services/formatting/smartIndenter.ts | 383 +++++++++++++++++++++++ src/services/services.ts | 11 +- 3 files changed, 390 insertions(+), 9 deletions(-) create mode 100644 src/services/formatting/smartIndenter.ts diff --git a/Jakefile b/Jakefile index 79907e8a63..97b1bc826a 100644 --- a/Jakefile +++ b/Jakefile @@ -54,6 +54,7 @@ var servicesSources = [ }).concat([ "services.ts", "shims.ts", + "formatting\\smartIndenter.ts" ].map(function (f) { return path.join(servicesDirectory, f); })); @@ -318,7 +319,7 @@ function exec(cmd, completeHandler) { complete(); }) try{ - ex.run(); + ex.run(); } catch(e) { console.log('Exception: ' + e) } @@ -385,7 +386,7 @@ desc("Generates code coverage data via instanbul") task("generate-code-coverage", ["tests", builtLocalDirectory], function () { var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run; console.log(cmd); - exec(cmd); + exec(cmd); }, { async: true }); // Browser tests diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts new file mode 100644 index 0000000000..82bbaad81b --- /dev/null +++ b/src/services/formatting/smartIndenter.ts @@ -0,0 +1,383 @@ +/// + +module ts.formatting { + export module SmartIndenter { + export function getIndentation(position: number, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + if (position > sourceFile.text.length) { + return 0; // past EOF + } + + var precedingToken = findPrecedingToken(position, sourceFile); + if (!precedingToken) { + return 0; + } + + // no indentation in string \regex literals + if ((precedingToken.kind === SyntaxKind.StringLiteral || precedingToken.kind === SyntaxKind.RegularExpressionLiteral) && + precedingToken.getStart(sourceFile) <= position && + precedingToken.end > position) { + return 0; + } + + // try to find the node that will include 'position' starting from 'precedingToken' + // if such node is found - compute initial indentation for 'position' inside this node + var previous: Node; + var current = precedingToken; + var indentation: number; + while (current) { + if (!isToken(current) && isPositionBelongToNode(current, position, sourceFile)) { + indentation = getInitialIndentationInNode(position, current, previous, sourceFile, options); + break; + } + + previous = current; + current = current.parent; + } + + if (!current) { + return 0; + } + + var currentStartLine: number = sourceFile.getLineAndCharacterFromPosition(current.getStart(sourceFile)).line; + var parent: Node = current.parent; + var parentStartLine: number; + + // walk upwards and collect indentations for pairs of parent-child nodes + // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' + while (parent) { + parentStartLine = sourceFile.getLineAndCharacterFromPosition(parent.getStart(sourceFile)).line; + if (isNodeContentIndented(parent, current) && parentStartLine !== currentStartLine && !isChildOnTheSameLineWithElseInIfStatement(parent, current, sourceFile)) { + indentation += options.indentSpaces; + } + + current = parent; + currentStartLine = parentStartLine; + parent = current.parent; + } + + return indentation; + } + + function getInitialIndentationInNode(position: number, parent: Node, previous: Node, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + if (parent.kind === SyntaxKind.IfStatement) { + Debug.assert(previous); + + // IfStatement will be parent when: + // - previous token is the immediate child of IfStatement - some token + // - Then\Else parts are completed and position is outside Then\Else statements + if ((parent).thenStatement === previous || (parent).elseStatement === previous) { + if (previous.getStart(sourceFile) > position || previous.end < position) { + return 0; + } + else { + return indentIfPositionOnDifferentLineWithNodeStart(position, previous, sourceFile, options); + } + } + } + else if (parent.kind === SyntaxKind.TryStatement) { + Debug.assert(previous); + // this is possible only if position is next to completed Try\Catch blocks - no indentation + if (previous.kind === SyntaxKind.TryBlock || previous.kind === SyntaxKind.CatchBlock) { + return 0; + } + } + + return indentIfPositionOnDifferentLineWithNodeStart(position, parent, sourceFile, options); + } + + function indentIfPositionOnDifferentLineWithNodeStart(position: number, node: Node, sourceFile: SourceFile, options: TypeScript.FormattingOptions): number { + return isPositionOnTheSameLineWithNodeStart(position, node, sourceFile) ? 0 : options.indentSpaces; + } + + function isPositionOnTheSameLineWithNodeStart(position: number, node: Node, sourceFile: SourceFile): boolean { + var lineAtPosition = sourceFile.getLineAndCharacterFromPosition(position).line; + var startLine = sourceFile.getLineAndCharacterFromPosition(node.getStart(sourceFile)).line; + return lineAtPosition === startLine; + } + + function isPositionBelongToNode(candidate: Node, position: number, sourceFile: SourceFile): boolean { + return candidate.end > position || !isCompletedNode(candidate, sourceFile); + } + + function isPositionOnTheSameLineWithSomeBrace(token: Node, position: number, sourceFile: SourceFile): boolean { + switch (token.kind) { + case SyntaxKind.OpenBraceToken: + case SyntaxKind.OpenBracketToken: + case SyntaxKind.OpenParenToken: + case SyntaxKind.CloseBraceToken: + case SyntaxKind.CloseBracketToken: + case SyntaxKind.CloseParenToken: + return isPositionOnTheSameLineWithNodeStart(position, token, sourceFile); + default: + return false; + } + } + + function isChildOnTheSameLineWithElseInIfStatement(parent: Node, child: Node, sourceFile: SourceFile): boolean { + if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { + var elseKeyword = findTokenOfKind(parent, SyntaxKind.ElseKeyword); + Debug.assert(elseKeyword); + + return isPositionOnTheSameLineWithNodeStart(child.getStart(sourceFile), elseKeyword, sourceFile); + } + } + + function findTokenOfKind(parent: Node, kind: SyntaxKind) { + return forEach(parent.getChildren(), c => c.kind === kind && c); + } + + // preserve indentation for list items + // - first list item is either on the same line with the parent: foo(a... . (in this case it is not indented) or on the different line (then it is indented with base level + delta) + // - subsequent list items inherit indentation for its sibling on the left when these siblings are also on the new line. + // 1. foo(a, b + // $ - indentation = base level + delta + // 2. foo (a, + // b, c, d, + // $ - same indentation with first child node on the previous line + // NOTE: indentation for list items spans from the beginning of the line to the first non-whitespace character + // /*test*/ x, + // $ <-- indentation for a new item will be here + function getCustomIndentationForListItem(leftSibling: Node, sourceFile: SourceFile): number { + if (leftSibling.parent) { + switch (leftSibling.parent.kind) { + case SyntaxKind.ObjectLiteral: + return getCustomIndentationFromList((leftSibling.parent).properties); + case SyntaxKind.TypeLiteral: + return getCustomIndentationFromList((leftSibling.parent).members); + case SyntaxKind.ArrayLiteral: + return getCustomIndentationFromList((leftSibling.parent).elements); + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Method: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + if ((leftSibling.parent).typeParameters && leftSibling.end < (leftSibling.parent).typeParameters.end) { + return getCustomIndentationFromList((leftSibling.parent).typeParameters); + } + else { + return getCustomIndentationFromList((leftSibling.parent).parameters); + } + case SyntaxKind.NewExpression: + case SyntaxKind.CallExpression: + if ((leftSibling.parent).typeArguments && leftSibling.end < (leftSibling.parent).typeArguments.end) { + return getCustomIndentationFromList((leftSibling.parent).typeArguments); + } + else { + return getCustomIndentationFromList((leftSibling.parent).arguments); + } + + break; + } + } + + return -1; + + function getCustomIndentationFromList(list: Node[]): number { + var index = indexOf(list, leftSibling); + if (index !== -1) { + var lineAndCol = sourceFile.getLineAndCharacterFromPosition(leftSibling.getStart(sourceFile)); + for (var i = index - 1; i >= 0; --i) { + var prevLineAndCol = sourceFile.getLineAndCharacterFromPosition(list[i].getStart(sourceFile)); + if (lineAndCol.line !== prevLineAndCol.line) { + // find the line start position + var lineStart = sourceFile.getPositionFromLineAndCharacter(lineAndCol.line, 1); + for (var i = 0; i <= lineAndCol.character; ++i) { + if (!isWhiteSpace(sourceFile.text.charCodeAt(lineStart + i))) { + return i; + } + } + // code is unreachable because the rance that we check above includes at least one non-whitespace character at the very end + Debug.fail("Unreachable code") + + } + lineAndCol = prevLineAndCol; + } + } + return -1; + } + } + + function findPrecedingToken(position: number, sourceFile: SourceFile): Node { + return find(sourceFile, /*diveIntoLastChild*/ false); + + function find(n: Node, diveIntoLastChild: boolean): Node { + if (isToken(n)) { + return n; + } + + var children = n.getChildren(); + if (diveIntoLastChild) { + var candidate = findLastChildNodeCandidate(children, children.length); + return candidate && find(candidate, diveIntoLastChild); + } + + for (var i = 0, len = children.length; i < len; ++i) { + var child = children[i]; + if (isCandidateNode(child)) { + if (position < child.end) { + if (child.getStart(sourceFile) >= position) { + // actual start of the node is past the position - previous token should be at the end of previous child + var candidate = findLastChildNodeCandidate(children, i); + return candidate && find(candidate, /*diveIntoLastChild*/ true) + } + else { + // candidate should be in this node + return find(child, diveIntoLastChild); + } + } + } + } + + // here we know that none of child token nodes embrace the position + // try to find the closest token on the left + if (children.length) { + var candidate = findLastChildNodeCandidate(children, children.length); + return candidate && find(candidate, /*diveIntoLastChild*/ true); + } + } + + // filters out EOF tokens, Missing\Omitted expressions, empty SyntaxLists and expression statements that wrap any of listed nodes. + function isCandidateNode(n: Node): boolean { + if (n.kind === SyntaxKind.ExpressionStatement) { + return isCandidateNode((n).expression); + } + + if (n.kind === SyntaxKind.EndOfFileToken || n.kind === SyntaxKind.OmittedExpression || n.kind === SyntaxKind.Missing) { + return false; + } + + // SyntaxList is already realized so getChildCount should be fast and non-expensive + return n.kind !== SyntaxKind.SyntaxList || n.getChildCount() !== 0; + } + + // finds last node that is considered as candidate for search (isCandidate(node) === true) starting from 'exclusiveStartPosition' + function findLastChildNodeCandidate(children: Node[], exclusiveStartPosition: number): Node { + for (var i = exclusiveStartPosition - 1; i >= 0; --i) { + if (isCandidateNode(children[i])) { + return children[i]; + } + } + } + } + + function isToken(n: Node): boolean { + return n.kind < SyntaxKind.Missing; + } + + function isNodeContentIndented(parent: Node, child: Node): boolean { + switch (parent.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + return true; + case SyntaxKind.ModuleDeclaration: + // ModuleBlock should take care of indentation + return false; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.Method: + case SyntaxKind.FunctionExpression: + // FunctionBlock should take care of indentation + return false; + case SyntaxKind.DoStatement: + case SyntaxKind.WhileStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + return child && child.kind !== SyntaxKind.Block; + case SyntaxKind.IfStatement: + return child && child.kind !== SyntaxKind.Block; + case SyntaxKind.TryStatement: + // TryBlock\CatchBlock\FinallyBlock should take care of indentation + return false; + case SyntaxKind.ArrayLiteral: + case SyntaxKind.Block: + case SyntaxKind.FunctionBlock: + case SyntaxKind.TryBlock: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.ModuleBlock: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.TypeLiteral: + case SyntaxKind.SwitchStatement: + case SyntaxKind.DefaultClause: + case SyntaxKind.CaseClause: + case SyntaxKind.ParenExpression: + case SyntaxKind.BinaryExpression: + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + return true; + default: + return false; + } + } + + function isNodeEndWith(n: Node, expectedLastToken: SyntaxKind, sourceFile: SourceFile): boolean { + var children = n.getChildren(sourceFile); + if (children.length) { + var last = children[children.length - 1]; + if (last.kind === expectedLastToken) { + return true; + } + else if (last.kind === SyntaxKind.SemicolonToken && children.length !== 1) { + return children[children.length - 2].kind === expectedLastToken; + } + } + return false; + } + + function isCompletedNode(n: Node, sourceFile: SourceFile): boolean { + switch (n.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ObjectLiteral: + case SyntaxKind.Block: + case SyntaxKind.CatchBlock: + case SyntaxKind.FinallyBlock: + case SyntaxKind.FunctionBlock: + case SyntaxKind.ModuleBlock: + case SyntaxKind.SwitchStatement: + return isNodeEndWith(n, SyntaxKind.CloseBraceToken, sourceFile); + case SyntaxKind.ParenExpression: + case SyntaxKind.CallSignature: + case SyntaxKind.CallExpression: + return isNodeEndWith(n, SyntaxKind.CloseParenToken, sourceFile); + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.Method: + case SyntaxKind.ArrowFunction: + return !(n).body || isCompletedNode((n).body, sourceFile); + case SyntaxKind.ModuleDeclaration: + return (n).body && isCompletedNode((n).body, sourceFile); + case SyntaxKind.IfStatement: + if ((n).elseStatement) { + return isCompletedNode((n).elseStatement, sourceFile); + } + return isCompletedNode((n).thenStatement, sourceFile); + case SyntaxKind.ExpressionStatement: + return isCompletedNode((n).expression, sourceFile); + case SyntaxKind.ArrayLiteral: + return isNodeEndWith(n, SyntaxKind.CloseBracketToken, sourceFile); + case SyntaxKind.Missing: + return false; + case SyntaxKind.CaseClause: + case SyntaxKind.DefaultClause: + // there is no such thing as terminator token for CaseClause\DefaultClause so for simplicitly always consider them non-completed + return false; + case SyntaxKind.VariableStatement: + // variable statement is considered completed if it either doesn'not have variable declarations or last variable declaration is completed + var variableDeclarations = (n).declarations; + return variableDeclarations.length === 0 || isCompletedNode(variableDeclarations[variableDeclarations.length - 1], sourceFile); + case SyntaxKind.VariableDeclaration: + // variable declaration is completed if it either doesn't have initializer or initializer is completed + return !(n).initializer || isCompletedNode((n).initializer, sourceFile); + case SyntaxKind.WhileStatement: + return isCompletedNode((n).statement, sourceFile); + case SyntaxKind.DoStatement: + return isCompletedNode((n).statement, sourceFile); + default: + return true; + } + } + } +} \ No newline at end of file diff --git a/src/services/services.ts b/src/services/services.ts index 740bfb899b..d7edb4349b 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -11,6 +11,7 @@ /// /// /// +/// /// /// @@ -2932,15 +2933,11 @@ module ts { function getIndentationAtPosition(filename: string, position: number, editorOptions: EditorOptions) { filename = TypeScript.switchToForwardSlashes(filename); - - var syntaxTree = getSyntaxTree(filename); - - var scriptSnapshot = syntaxTreeCache.getCurrentScriptSnapshot(filename); - var scriptText = TypeScript.SimpleText.fromScriptSnapshot(scriptSnapshot); - var textSnapshot = new TypeScript.Services.Formatting.TextSnapshot(scriptText); + + var sourceFile = getCurrentSourceFile(filename); var options = new TypeScript.FormattingOptions(!editorOptions.ConvertTabsToSpaces, editorOptions.TabSize, editorOptions.IndentSize, editorOptions.NewLineCharacter) - return TypeScript.Services.Formatting.SingleTokenIndenter.getIndentationAmount(position, syntaxTree.sourceUnit(), textSnapshot, options); + return formatting.SmartIndenter.getIndentation(position, sourceFile, options); } function getFormattingManager(filename: string, options: FormatCodeOptions) { From 563b92cdce7887eb12b3826b8b1907d44bd9f54a Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Thu, 11 Sep 2014 10:54:30 -0700 Subject: [PATCH 34/79] update test baselines --- .../fourslash/noSmartIndentInsideMultilineString.ts | 3 +-- .../fourslash/smartIndentInsideMultilineString.ts | 10 +++------- tests/cases/fourslash/smartIndentStatementSwitch.ts | 2 +- tests/cases/fourslash/switchIndenting.ts | 4 +--- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts b/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts index 9018a54b33..692dfe7075 100644 --- a/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts +++ b/tests/cases/fourslash/noSmartIndentInsideMultilineString.ts @@ -8,5 +8,4 @@ goTo.marker("1"); edit.insert("\r\n"); -// Won't-fixed: Disable SmartIndent inside multiline string in TS. Should be 0 -verify.indentationIs(8); \ No newline at end of file +verify.indentationIs(0); \ No newline at end of file diff --git a/tests/cases/fourslash/smartIndentInsideMultilineString.ts b/tests/cases/fourslash/smartIndentInsideMultilineString.ts index 8ad4430455..24a20844a9 100644 --- a/tests/cases/fourslash/smartIndentInsideMultilineString.ts +++ b/tests/cases/fourslash/smartIndentInsideMultilineString.ts @@ -21,15 +21,11 @@ //// } ////} -// Behavior below is not ideal, ideal is in comments goTo.marker("1"); -//verify.indentationIs(0); -verify.indentationIs(8); +verify.indentationIs(0); goTo.marker("2"); -//verify.indentationIs(0); -verify.indentationIs(4); +verify.indentationIs(0); goTo.marker("3"); -//verify.indentationIs(0); -verify.indentationIs(12); \ No newline at end of file +verify.indentationIs(0); \ No newline at end of file diff --git a/tests/cases/fourslash/smartIndentStatementSwitch.ts b/tests/cases/fourslash/smartIndentStatementSwitch.ts index 902abe4e3e..e8d2a02948 100644 --- a/tests/cases/fourslash/smartIndentStatementSwitch.ts +++ b/tests/cases/fourslash/smartIndentStatementSwitch.ts @@ -11,7 +11,7 @@ //// case 1: //// {| "indentation": 12 |} //// break; -//// {| "indentation": 8 |} +//// {| "indentation": 12 |} // content of case clauses is always indented relatively to case clause //// } //// {| "indentation": 4 |} ////} diff --git a/tests/cases/fourslash/switchIndenting.ts b/tests/cases/fourslash/switchIndenting.ts index 3fee7ba2e4..8ea6f26408 100644 --- a/tests/cases/fourslash/switchIndenting.ts +++ b/tests/cases/fourslash/switchIndenting.ts @@ -8,6 +8,4 @@ goTo.marker(); edit.insert('case 1:\n'); -// ideally would be 8 -//verify.indentationIs(8); -verify.indentationIs(4); +verify.indentationIs(8); \ No newline at end of file From 96e5bd26c3e43a52d37a8e75a36fb385ca058864 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 11 Sep 2014 15:48:24 -0700 Subject: [PATCH 35/79] Fixed bug where function type literals may omit their '=>'. --- src/compiler/parser.ts | 13 ++++++++++++- .../functionTypesLackingReturnTypes.errors.txt | 18 ++++++++++++++++++ .../functionTypesLackingReturnTypes.ts | 13 +++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/functionTypesLackingReturnTypes.errors.txt create mode 100644 tests/cases/compiler/functionTypesLackingReturnTypes.ts diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index cfe27e7e7c..8b44bdab60 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1274,7 +1274,18 @@ module ts { var typeParameters = parseTypeParameters(); var parameters = parseParameterList(SyntaxKind.OpenParenToken, SyntaxKind.CloseParenToken); checkParameterList(parameters); - var type = parseOptional(returnToken) ? parseType() : undefined; + + var type: TypeNode; + + if (returnToken === SyntaxKind.EqualsGreaterThanToken) { + parseExpected(returnToken); + type = parseType(); + } + else if (parseOptional(returnToken)) + { + type = parseType(); + } + return { typeParameters: typeParameters, parameters: parameters, diff --git a/tests/baselines/reference/functionTypesLackingReturnTypes.errors.txt b/tests/baselines/reference/functionTypesLackingReturnTypes.errors.txt new file mode 100644 index 0000000000..289f5d11d4 --- /dev/null +++ b/tests/baselines/reference/functionTypesLackingReturnTypes.errors.txt @@ -0,0 +1,18 @@ +==== tests/cases/compiler/functionTypesLackingReturnTypes.ts (2 errors) ==== + + // Error (no '=>') + function f(x: ()) { + ~ +!!! '=>' expected. + } + + // Error (no '=>') + var g: (param); + ~ +!!! '=>' expected. + + // Okay + var h: { () } + + // Okay + var i: { new () } \ No newline at end of file diff --git a/tests/cases/compiler/functionTypesLackingReturnTypes.ts b/tests/cases/compiler/functionTypesLackingReturnTypes.ts new file mode 100644 index 0000000000..f1dac47128 --- /dev/null +++ b/tests/cases/compiler/functionTypesLackingReturnTypes.ts @@ -0,0 +1,13 @@ + +// Error (no '=>') +function f(x: ()) { +} + +// Error (no '=>') +var g: (param); + +// Okay +var h: { () } + +// Okay +var i: { new () } \ No newline at end of file From ee86f8b71157454f7e08f1d58d212f0d3ea37da3 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 11 Sep 2014 15:19:57 -0700 Subject: [PATCH 36/79] Harness now prints category and code when running tests. --- src/harness/harness.ts | 6 +- .../reference/ArrowFunction1.errors.txt | 2 +- .../reference/ArrowFunction2.errors.txt | 4 +- .../reference/ArrowFunction3.errors.txt | 6 +- .../ArrowFunctionExpression1.errors.txt | 2 +- ...emberThatUsesClassTypeParameter.errors.txt | 10 +- ...lassStaticFunctionOfTheSameName.errors.txt | 2 +- ...lassStaticFunctionOfTheSameName.errors.txt | 2 +- ...unctionUsingClassPrivateStatics.errors.txt | 2 +- ...dExportedFunctionThatShareAName.errors.txt | 4 +- ...bleAndExportedVarThatShareAName.errors.txt | 4 +- ...ModuleWithSameNameAndCommonRoot.errors.txt | 2 +- .../reference/ClassDeclaration10.errors.txt | 4 +- .../reference/ClassDeclaration11.errors.txt | 2 +- .../reference/ClassDeclaration13.errors.txt | 2 +- .../reference/ClassDeclaration14.errors.txt | 4 +- .../reference/ClassDeclaration15.errors.txt | 2 +- .../reference/ClassDeclaration21.errors.txt | 2 +- .../reference/ClassDeclaration22.errors.txt | 2 +- .../reference/ClassDeclaration24.errors.txt | 2 +- .../reference/ClassDeclaration25.errors.txt | 4 +- .../reference/ClassDeclaration8.errors.txt | 2 +- .../reference/ClassDeclaration9.errors.txt | 2 +- .../reference/ExportAssignment7.errors.txt | 6 +- .../reference/ExportAssignment8.errors.txt | 6 +- ...esInNestedMemberTypeAnnotations.errors.txt | 6 +- ...ModuleWithSameNameAndCommonRoot.errors.txt | 6 +- .../reference/FunctionDeclaration3.errors.txt | 2 +- .../reference/FunctionDeclaration4.errors.txt | 2 +- .../reference/FunctionDeclaration6.errors.txt | 2 +- .../reference/FunctionDeclaration7.errors.txt | 2 +- .../InterfaceDeclaration8.errors.txt | 2 +- .../InvalidNonInstantiatedModule.errors.txt | 4 +- .../MemberAccessorDeclaration15.errors.txt | 4 +- ...dClassWithSameNameAndCommonRoot.errors.txt | 4 +- ...nctionWithSameNameAndCommonRoot.errors.txt | 4 +- ...thExportedAndNonExportedClasses.errors.txt | 4 +- ...WithExportedAndNonExportedEnums.errors.txt | 2 +- ...ExportedAndNonExportedFunctions.errors.txt | 4 +- ...portedAndNonExportedImportAlias.errors.txt | 2 +- ...ExportedAndNonExportedVariables.errors.txt | 2 +- .../reference/ParameterList13.errors.txt | 2 +- .../reference/ParameterList4.errors.txt | 2 +- .../reference/ParameterList5.errors.txt | 6 +- .../reference/ParameterList6.errors.txt | 2 +- .../reference/ParameterList7.errors.txt | 4 +- .../reference/ParameterList8.errors.txt | 6 +- ...ithExportedClassesOfTheSameName.errors.txt | 4 +- ...hExportedLocalVarsOfTheSameName.errors.txt | 8 +- .../reference/TypeArgumentList1.errors.txt | 10 +- ...rParameterAccessibilityModifier.errors.txt | 8 +- .../reference/accessorWithES3.errors.txt | 8 +- .../accessorWithInitializer.errors.txt | 4 +- .../accessorWithRestParam.errors.txt | 4 +- ...ccessorsAreNotContextuallyTyped.errors.txt | 4 +- .../reference/accessorsEmit.errors.txt | 4 +- .../accessorsInAmbientContext.errors.txt | 16 +- .../accessorsNotAllowedInES3.errors.txt | 4 +- ...rs_spec_section-4.5_error-cases.errors.txt | 24 +- ...sors_spec_section-4.5_inference.errors.txt | 24 +- ...addMoreOverloadsToBaseSignature.errors.txt | 6 +- ...tionOperatorWithInvalidOperands.errors.txt | 38 +- ...WithNullValueAndInvalidOperator.errors.txt | 22 +- ...thOnlyNullValueOrUndefinedValue.errors.txt | 8 +- ...ditionOperatorWithTypeParameter.errors.txt | 32 +- ...ndefinedValueAndInvalidOperands.errors.txt | 22 +- .../reference/aliasAssignments.errors.txt | 6 +- tests/baselines/reference/aliasBug.errors.txt | 2 +- .../reference/aliasErrors.errors.txt | 14 +- .../aliasInaccessibleModule.errors.txt | 2 +- .../aliasInaccessibleModule2.errors.txt | 2 +- .../aliasOnMergedModuleInterface.errors.txt | 2 +- ...tAssignmentUsedInVarInitializer.errors.txt | 2 +- ...ambientClassOverloadForFunction.errors.txt | 2 +- .../ambientDeclarationsExternal.errors.txt | 2 +- .../ambientEnumElementInitializer3.errors.txt | 2 +- .../reference/ambientErrors.errors.txt | 32 +- ...alModuleInAnotherExternalModule.errors.txt | 4 +- ...tExternalModuleInsideNonAmbient.errors.txt | 2 +- ...eInsideNonAmbientExternalModule.errors.txt | 2 +- ...lativeExternalImportDeclaration.errors.txt | 4 +- ...nalModuleWithRelativeModuleName.errors.txt | 4 +- .../reference/ambientGetters.errors.txt | 4 +- .../ambientWithStatements.errors.txt | 30 +- .../ambiguousGenericAssertion1.errors.txt | 10 +- .../reference/ambiguousOverload.errors.txt | 4 +- .../amdDependencyComment1.errors.txt | 2 +- .../amdDependencyComment2.errors.txt | 2 +- .../reference/anonymousModules.errors.txt | 26 +- .../reference/anyAsConstructor.errors.txt | 2 +- .../anyAsGenericFunctionCall.errors.txt | 8 +- .../anyAssignableToEveryType2.errors.txt | 2 +- .../baselines/reference/anyDeclare.errors.txt | 2 +- .../reference/anyIdenticalToItself.errors.txt | 6 +- .../apparentTypeSubtyping.errors.txt | 6 +- .../apparentTypeSupertype.errors.txt | 6 +- ...indsToFunctionScopeArgumentList.errors.txt | 4 +- .../reference/arithAssignTyping.errors.txt | 24 +- .../arithmeticOnInvalidTypes.errors.txt | 14 +- .../arithmeticOnInvalidTypes2.errors.txt | 14 +- ...eticOperatorWithInvalidOperands.errors.txt | 1120 ++++++++--------- ...WithNullValueAndInvalidOperands.errors.txt | 480 +++---- ...thOnlyNullValueOrUndefinedValue.errors.txt | 160 +-- ...hmeticOperatorWithTypeParameter.errors.txt | 360 +++--- ...ndefinedValueAndInvalidOperands.errors.txt | 480 +++---- .../reference/arrayAssignmentTest1.errors.txt | 94 +- .../reference/arrayAssignmentTest2.errors.txt | 46 +- .../reference/arrayAssignmentTest3.errors.txt | 2 +- .../reference/arrayAssignmentTest4.errors.txt | 8 +- .../reference/arrayAssignmentTest5.errors.txt | 6 +- .../baselines/reference/arrayCast.errors.txt | 6 +- ...AndArrayConstructorEquivalence1.errors.txt | 2 +- .../arrayLiteralContextualType.errors.txt | 6 +- .../arrayReferenceWithoutTypeArgs.errors.txt | 2 +- .../reference/arraySigChecking.errors.txt | 14 +- .../arrayTypeOfFunctionTypes.errors.txt | 4 +- .../arrayTypeOfFunctionTypes2.errors.txt | 2 +- .../reference/arrayTypeOfTypeOf.errors.txt | 14 +- .../arrowFunctionContexts.errors.txt | 20 +- ...wFunctionInConstructorArgument1.errors.txt | 2 +- ...nctionMissingCurlyWithSemicolon.errors.txt | 2 +- .../arrowFunctionsMissingTokens.errors.txt | 48 +- .../baselines/reference/asiReturn.errors.txt | 2 +- .../assertInWrapSomeTypeParameter.errors.txt | 4 +- .../reference/assignAnyToEveryType.errors.txt | 2 +- .../assignFromBooleanInterface.errors.txt | 2 +- .../assignFromBooleanInterface2.errors.txt | 4 +- .../assignFromNumberInterface.errors.txt | 2 +- .../assignFromNumberInterface2.errors.txt | 4 +- .../assignFromStringInterface.errors.txt | 2 +- .../assignFromStringInterface2.errors.txt | 4 +- ...ambdaToNominalSubtypeOfFunction.errors.txt | 8 +- .../reference/assignToEnum.errors.txt | 8 +- .../assignToExistingClass.errors.txt | 2 +- .../baselines/reference/assignToFn.errors.txt | 2 +- .../reference/assignToInvalidLHS.errors.txt | 2 +- .../reference/assignToModule.errors.txt | 2 +- .../reference/assignmentCompat1.errors.txt | 8 +- .../reference/assignmentCompatBug2.errors.txt | 20 +- .../reference/assignmentCompatBug3.errors.txt | 6 +- .../reference/assignmentCompatBug5.errors.txt | 12 +- ...CompatFunctionsWithOptionalArgs.errors.txt | 12 +- ...terfaceWithStringIndexSignature.errors.txt | 2 +- ...ignmentCompatWithCallSignatures.errors.txt | 48 +- ...gnmentCompatWithCallSignatures2.errors.txt | 72 +- ...gnmentCompatWithCallSignatures4.errors.txt | 28 +- ...ignaturesWithOptionalParameters.errors.txt | 14 +- ...allSignaturesWithRestParameters.errors.txt | 54 +- ...ntCompatWithConstructSignatures.errors.txt | 16 +- ...tCompatWithConstructSignatures2.errors.txt | 56 +- ...tCompatWithConstructSignatures4.errors.txt | 52 +- ...ignaturesWithOptionalParameters.errors.txt | 10 +- ...ompatWithGenericCallSignatures4.errors.txt | 4 +- ...ignaturesWithOptionalParameters.errors.txt | 12 +- ...ignmentCompatWithNumericIndexer.errors.txt | 44 +- ...gnmentCompatWithNumericIndexer2.errors.txt | 44 +- ...gnmentCompatWithNumericIndexer3.errors.txt | 22 +- ...ignmentCompatWithObjectMembers4.errors.txt | 136 +- ...ignmentCompatWithObjectMembers5.errors.txt | 8 +- ...tWithObjectMembersAccessibility.errors.txt | 96 +- ...patWithObjectMembersOptionality.errors.txt | 24 +- ...atWithObjectMembersOptionality2.errors.txt | 36 +- ...ObjectMembersStringNumericNames.errors.txt | 116 +- .../assignmentCompatWithOverloads.errors.txt | 20 +- ...signmentCompatWithStringIndexer.errors.txt | 60 +- ...ignmentCompatWithStringIndexer2.errors.txt | 60 +- ...ignmentCompatWithStringIndexer3.errors.txt | 14 +- .../assignmentCompatability10.errors.txt | 4 +- .../assignmentCompatability11.errors.txt | 6 +- .../assignmentCompatability12.errors.txt | 6 +- .../assignmentCompatability13.errors.txt | 4 +- .../assignmentCompatability14.errors.txt | 6 +- .../assignmentCompatability15.errors.txt | 6 +- .../assignmentCompatability16.errors.txt | 8 +- .../assignmentCompatability17.errors.txt | 8 +- .../assignmentCompatability18.errors.txt | 8 +- .../assignmentCompatability19.errors.txt | 8 +- .../assignmentCompatability20.errors.txt | 8 +- .../assignmentCompatability21.errors.txt | 8 +- .../assignmentCompatability22.errors.txt | 8 +- .../assignmentCompatability23.errors.txt | 8 +- .../assignmentCompatability24.errors.txt | 2 +- .../assignmentCompatability25.errors.txt | 6 +- .../assignmentCompatability26.errors.txt | 6 +- .../assignmentCompatability27.errors.txt | 4 +- .../assignmentCompatability28.errors.txt | 6 +- .../assignmentCompatability29.errors.txt | 8 +- .../assignmentCompatability30.errors.txt | 8 +- .../assignmentCompatability31.errors.txt | 8 +- .../assignmentCompatability32.errors.txt | 8 +- .../assignmentCompatability33.errors.txt | 2 +- .../assignmentCompatability34.errors.txt | 2 +- .../assignmentCompatability35.errors.txt | 4 +- .../assignmentCompatability36.errors.txt | 4 +- .../assignmentCompatability37.errors.txt | 2 +- .../assignmentCompatability38.errors.txt | 2 +- .../assignmentCompatability39.errors.txt | 4 +- .../assignmentCompatability40.errors.txt | 4 +- .../assignmentCompatability41.errors.txt | 4 +- .../assignmentCompatability42.errors.txt | 4 +- .../assignmentCompatability43.errors.txt | 4 +- ...ember-off-of-function-interface.errors.txt | 26 +- ...ember-off-of-function-interface.errors.txt | 26 +- .../reference/assignmentLHSIsValue.errors.txt | 80 +- .../assignmentStricterConstraints.errors.txt | 4 +- .../reference/assignmentToFunction.errors.txt | 4 +- .../reference/assignmentToObject.errors.txt | 6 +- .../assignmentToObjectAndFunction.errors.txt | 16 +- ...nmentToParenthesizedExpression1.errors.txt | 2 +- ...nmentToParenthesizedIdentifiers.errors.txt | 60 +- .../assignmentToReferenceTypes.errors.txt | 8 +- .../reference/assignments.errors.txt | 12 +- ...ssWithPrototypePropertyOnModule.errors.txt | 2 +- ...eAssignmentCompatIndexSignature.errors.txt | 8 +- .../reference/augmentedTypesClass.errors.txt | 4 +- .../reference/augmentedTypesClass2.errors.txt | 4 +- .../augmentedTypesClass2a.errors.txt | 4 +- .../reference/augmentedTypesClass4.errors.txt | 2 +- .../reference/augmentedTypesEnum.errors.txt | 14 +- .../reference/augmentedTypesEnum2.errors.txt | 4 +- .../reference/augmentedTypesEnum3.errors.txt | 2 +- .../augmentedTypesFunction.errors.txt | 12 +- .../augmentedTypesInterface.errors.txt | 4 +- .../augmentedTypesModules.errors.txt | 12 +- .../augmentedTypesModules2.errors.txt | 6 +- .../augmentedTypesModules3.errors.txt | 2 +- .../reference/augmentedTypesVar.errors.txt | 14 +- .../baselines/reference/autoLift2.errors.txt | 20 +- .../baselines/reference/autolift3.errors.txt | 2 +- .../baselines/reference/autolift4.errors.txt | 2 +- .../reference/badArrayIndex.errors.txt | 4 +- .../reference/badArraySyntax.errors.txt | 12 +- .../badExternalModuleReference.errors.txt | 2 +- .../baselines/reference/baseCheck.errors.txt | 18 +- .../baseTypePrivateMemberClash.errors.txt | 4 +- tests/baselines/reference/bases.errors.txt | 22 +- ...onTypeOfConditionalExpressions2.errors.txt | 16 +- .../reference/binaryArithmatic3.errors.txt | 4 +- .../reference/binaryArithmatic4.errors.txt | 4 +- tests/baselines/reference/bind1.errors.txt | 2 +- ...iseNotOperatorInvalidOperations.errors.txt | 8 +- ...wiseNotOperatorWithAnyOtherType.errors.txt | 6 +- .../reference/boolInsteadOfBoolean.errors.txt | 2 +- ...akInIterationOrSwitchStatement4.errors.txt | 2 +- ...otInIterationOrSwitchStatement1.errors.txt | 2 +- ...otInIterationOrSwitchStatement2.errors.txt | 2 +- .../reference/breakTarget5.errors.txt | 2 +- .../reference/breakTarget6.errors.txt | 2 +- .../callConstructAssignment.errors.txt | 4 +- ...hIncorrectNumberOfTypeArguments.errors.txt | 28 +- ...enericFunctionWithTypeArguments.errors.txt | 18 +- .../reference/callOnClass.errors.txt | 2 +- .../reference/callOnInstance.errors.txt | 8 +- ...rloadViaElementAccessExpression.errors.txt | 4 +- .../reference/callOverloads1.errors.txt | 6 +- .../reference/callOverloads2.errors.txt | 10 +- .../reference/callOverloads3.errors.txt | 10 +- .../reference/callOverloads4.errors.txt | 10 +- .../reference/callOverloads5.errors.txt | 10 +- ...atureAssignabilityInInheritance.errors.txt | 8 +- ...tureAssignabilityInInheritance3.errors.txt | 28 +- ...OptionalParameterAndInitializer.errors.txt | 32 +- ...dBeResolvedBeforeSpecialization.errors.txt | 2 +- ...uresThatDifferOnlyByReturnType2.errors.txt | 6 +- ...essibilityModifiersOnParameters.errors.txt | 80 +- ...gnaturesWithDuplicateParameters.errors.txt | 44 +- ...aturesWithParameterInitializers.errors.txt | 8 +- ...turesWithParameterInitializers2.errors.txt | 8 +- ...lWithWrongNumberOfTypeArguments.errors.txt | 4 +- ...callbackArgsDifferByOptionality.errors.txt | 4 +- ...annotInvokeNewOnErrorExpression.errors.txt | 4 +- ...annotInvokeNewOnIndexExpression.errors.txt | 2 +- .../catchClauseWithTypeAnnotation.errors.txt | 2 +- .../reference/chainedAssignment1.errors.txt | 10 +- .../reference/chainedAssignment3.errors.txt | 6 +- .../chainedAssignmentChecking.errors.txt | 8 +- ...ConstrainedToOtherTypeParameter.errors.txt | 2 +- ...onstrainedToOtherTypeParameter2.errors.txt | 10 +- .../checkForObjectTooStrict.errors.txt | 4 +- .../circularModuleImports.errors.txt | 2 +- .../reference/circularReference.errors.txt | 8 +- tests/baselines/reference/class1.errors.txt | 2 +- tests/baselines/reference/class2.errors.txt | 4 +- .../reference/classAndInterface1.errors.txt | 2 +- .../classAndInterfaceWithSameName.errors.txt | 4 +- .../classAndVariableWithSameName.errors.txt | 4 +- .../classBodyWithStatements.errors.txt | 8 +- .../reference/classCannotExtendVar.errors.txt | 2 +- .../classConstructorAccessibility.errors.txt | 4 +- .../reference/classExpression.errors.txt | 14 +- .../classExtendingPrimitive.errors.txt | 22 +- .../classExtendingPrimitive2.errors.txt | 6 +- .../classExtendingQualifiedName.errors.txt | 2 +- ...ithModuleNotReferingConstructor.errors.txt | 2 +- ...useClassNotReferringConstructor.errors.txt | 2 +- .../classExtendsEveryObjectType.errors.txt | 14 +- .../classExtendsEveryObjectType2.errors.txt | 6 +- .../classExtendsInterface.errors.txt | 4 +- ...ceThatExtendsClassWithPrivates1.errors.txt | 4 +- .../reference/classExtendsItself.errors.txt | 6 +- .../classExtendsItselfIndirectly.errors.txt | 4 +- .../classExtendsItselfIndirectly2.errors.txt | 4 +- .../classExtendsItselfIndirectly3.errors.txt | 4 +- ...classExtendsMultipleBaseClasses.errors.txt | 4 +- ...endsShadowedConstructorFunction.errors.txt | 2 +- ...ExtendsValidConstructorFunction.errors.txt | 2 +- ...ssHeritageWithTrailingSeparator.errors.txt | 2 +- .../classImplementsClass2.errors.txt | 8 +- .../classImplementsClass4.errors.txt | 8 +- .../classImplementsClass5.errors.txt | 12 +- .../classImplementsClass6.errors.txt | 4 +- .../reference/classIndexer2.errors.txt | 2 +- .../reference/classIndexer3.errors.txt | 2 +- .../reference/classIndexer4.errors.txt | 2 +- .../reference/classInheritence.errors.txt | 2 +- .../classIsSubtypeOfBaseType.errors.txt | 8 +- .../classMemberInitializerScoping.errors.txt | 4 +- ...mberInitializerWithLamdaScoping.errors.txt | 2 +- ...berInitializerWithLamdaScoping2.errors.txt | 2 +- ...berInitializerWithLamdaScoping3.errors.txt | 4 +- ...berInitializerWithLamdaScoping4.errors.txt | 4 +- .../classOverloadForFunction.errors.txt | 2 +- .../classOverloadForFunction2.errors.txt | 4 +- .../classPropertyAsPrivate.errors.txt | 24 +- .../classPropertyIsPublicByDefault.errors.txt | 8 +- .../classSideInheritance1.errors.txt | 4 +- .../classSideInheritance3.errors.txt | 4 +- .../classTypeParametersInStatics.errors.txt | 6 +- .../reference/classUpdateTests.errors.txt | 36 +- ...ssWithBaseClassButNoConstructor.errors.txt | 8 +- .../classWithConstructors.errors.txt | 12 +- .../classWithMultipleBaseClasses.errors.txt | 4 +- .../classWithOptionalParameter.errors.txt | 8 +- ...erloadImplementationOfWrongName.errors.txt | 2 +- ...rloadImplementationOfWrongName2.errors.txt | 4 +- ...classWithPredefinedTypesAsNames.errors.txt | 8 +- ...lassWithPredefinedTypesAsNames2.errors.txt | 2 +- .../classWithPrivateProperty.errors.txt | 16 +- .../classWithStaticMembers.errors.txt | 4 +- ...ssWithTwoConstructorDefinitions.errors.txt | 4 +- ...classWithoutExplicitConstructor.errors.txt | 4 +- .../baselines/reference/classdecl.errors.txt | 8 +- .../reference/clinterfaces.errors.txt | 8 +- .../cloduleSplitAcrossFiles.errors.txt | 2 +- .../reference/cloduleStaticMembers.errors.txt | 6 +- .../reference/cloduleTest2.errors.txt | 16 +- .../cloduleWithDuplicateMember1.errors.txt | 10 +- .../cloduleWithDuplicateMember2.errors.txt | 6 +- .../clodulesDerivedClasses.errors.txt | 8 +- ...ollisionArgumentsArrowFunctions.errors.txt | 4 +- ...lisionArgumentsClassConstructor.errors.txt | 10 +- .../collisionArgumentsClassMethod.errors.txt | 8 +- .../collisionArgumentsFunction.errors.txt | 8 +- ...ionArgumentsFunctionExpressions.errors.txt | 8 +- ...deGenModuleWithAccessorChildren.errors.txt | 10 +- ...collisionExportsRequireAndAlias.errors.txt | 4 +- ...collisionExportsRequireAndClass.errors.txt | 4 +- .../collisionExportsRequireAndEnum.errors.txt | 4 +- ...lisionExportsRequireAndFunction.errors.txt | 4 +- ...tsRequireAndInternalModuleAlias.errors.txt | 4 +- ...ollisionExportsRequireAndModule.errors.txt | 4 +- .../collisionExportsRequireAndVar.errors.txt | 4 +- ...sionRestParameterArrowFunctions.errors.txt | 2 +- ...onRestParameterClassConstructor.errors.txt | 6 +- ...llisionRestParameterClassMethod.errors.txt | 4 +- .../collisionRestParameterFunction.errors.txt | 4 +- ...estParameterFunctionExpressions.errors.txt | 4 +- ...onRestParameterUnderscoreIUsage.errors.txt | 2 +- ...uperAndLocalFunctionInAccessors.errors.txt | 20 +- ...erAndLocalFunctionInConstructor.errors.txt | 4 +- ...onSuperAndLocalFunctionInMethod.errors.txt | 4 +- ...SuperAndLocalFunctionInProperty.errors.txt | 2 +- ...sionSuperAndLocalVarInAccessors.errors.txt | 20 +- ...onSuperAndLocalVarInConstructor.errors.txt | 4 +- ...llisionSuperAndLocalVarInMethod.errors.txt | 4 +- ...isionSuperAndLocalVarInProperty.errors.txt | 2 +- ...collisionSuperAndNameResolution.errors.txt | 2 +- .../collisionSuperAndParameter.errors.txt | 18 +- .../collisionSuperAndParameter1.errors.txt | 2 +- ...opertyNameAsConstuctorParameter.errors.txt | 8 +- ...nThisExpressionAndAliasInGlobal.errors.txt | 2 +- ...pressionAndAmbientClassInGlobal.errors.txt | 2 +- ...ExpressionAndAmbientVarInGlobal.errors.txt | 2 +- ...nThisExpressionAndClassInGlobal.errors.txt | 2 +- ...onThisExpressionAndEnumInGlobal.errors.txt | 2 +- ...isExpressionAndFunctionInGlobal.errors.txt | 2 +- ...xpressionAndLocalVarInAccessors.errors.txt | 16 +- ...ressionAndLocalVarInConstructor.errors.txt | 4 +- ...ExpressionAndLocalVarInFunction.errors.txt | 2 +- ...isExpressionAndLocalVarInLambda.errors.txt | 2 +- ...isExpressionAndLocalVarInMethod.errors.txt | 4 +- ...ExpressionAndLocalVarInProperty.errors.txt | 4 +- ...nAndLocalVarWithSuperExperssion.errors.txt | 4 +- ...ThisExpressionAndModuleInGlobal.errors.txt | 2 +- ...ThisExpressionAndNameResolution.errors.txt | 2 +- ...isionThisExpressionAndParameter.errors.txt | 16 +- ...opertyNameAsConstuctorParameter.errors.txt | 8 +- ...ionThisExpressionAndVarInGlobal.errors.txt | 2 +- ...maOperatorInvalidAssignmentType.errors.txt | 12 +- ...maOperatorOtherInvalidOperation.errors.txt | 4 +- .../commaOperatorWithoutOperand.errors.txt | 24 +- .../commentOnClassAccessor1.errors.txt | 2 +- .../commentOnClassAccessor2.errors.txt | 4 +- .../commentOnImportStatement1.errors.txt | 2 +- .../commentOnImportStatement2.errors.txt | 2 +- .../commentOnImportStatement3.errors.txt | 2 +- .../commentsOnObjectLiteral1.errors.txt | 2 +- .../commentsOnObjectLiteral2.errors.txt | 2 +- ...ationshipObjectsOnCallSignature.errors.txt | 192 +-- ...ipObjectsOnConstructorSignature.errors.txt | 192 +-- ...tionshipObjectsOnIndexSignature.errors.txt | 128 +- ...ectsOnInstantiatedCallSignature.errors.txt | 2 +- ...nstantiatedConstructorSignature.errors.txt | 2 +- ...onshipObjectsOnOptionalProperty.errors.txt | 32 +- ...NoRelationshipObjectsOnProperty.errors.txt | 64 +- ...WithNoRelationshipPrimitiveType.errors.txt | 288 ++--- ...WithNoRelationshipTypeParameter.errors.txt | 240 ++-- ...jectOnInstantiatedCallSignature.errors.txt | 32 +- ...nstantiatedConstructorSignature.errors.txt | 32 +- ...arisonOperatorWithTypeParameter.errors.txt | 64 +- ...ericRecursiveBaseClassReference.errors.txt | 4 +- .../reference/complicatedPrivacy.errors.txt | 8 +- ...onAssignmentLHSCannotBeAssigned.errors.txt | 12 +- ...onAssignmentWithInvalidOperands.errors.txt | 54 +- ...icAssignmentWithInvalidOperands.errors.txt | 136 +- .../compoundAssignmentLHSIsValue.errors.txt | 160 +-- .../reference/concatClassAndString.errors.txt | 2 +- .../conditionalExpression1.errors.txt | 4 +- ...onalOperatorWithoutIdenticalBCT.errors.txt | 28 +- .../conflictingMemberTypesInBases.errors.txt | 4 +- .../conflictingTypeAnnotatedVar.errors.txt | 8 +- ...tOverloadFunctionNoSubtypeError.errors.txt | 6 +- .../reference/constraintErrors1.errors.txt | 2 +- ...ameterFromSameTypeParameterList.errors.txt | 12 +- .../constraintSatisfactionWithAny2.errors.txt | 2 +- .../reference/constraints0.errors.txt | 4 +- ...ThatReferenceOtherContstraints1.errors.txt | 4 +- ...atureAssignabilityInInheritance.errors.txt | 8 +- ...tureAssignabilityInInheritance3.errors.txt | 28 +- ...essibilityModifiersOnParameters.errors.txt | 8 +- ...ssibilityModifiersOnParameters2.errors.txt | 30 +- ...nstructSignaturesWithOverloads2.errors.txt | 2 +- .../constructorArgsErrors1.errors.txt | 2 +- .../constructorArgsErrors2.errors.txt | 2 +- .../constructorArgsErrors3.errors.txt | 2 +- .../constructorArgsErrors4.errors.txt | 2 +- .../constructorArgsErrors5.errors.txt | 2 +- .../reference/constructorAsType.errors.txt | 2 +- ...torDefaultValuesReferencingThis.errors.txt | 6 +- ...mplementationWithDefaultValues2.errors.txt | 8 +- ...torInvocationWithTooFewTypeArgs.errors.txt | 2 +- .../constructorOverloads1.errors.txt | 6 +- .../constructorOverloads3.errors.txt | 2 +- .../constructorOverloads4.errors.txt | 8 +- .../constructorOverloads5.errors.txt | 2 +- .../constructorOverloads6.errors.txt | 2 +- .../constructorOverloads7.errors.txt | 4 +- .../constructorOverloads8.errors.txt | 2 +- ...uctorOverloadsWithDefaultValues.errors.txt | 4 +- .../constructorParameterProperties.errors.txt | 6 +- ...constructorParameterProperties2.errors.txt | 4 +- ...ctorParameterShadowsOuterScopes.errors.txt | 6 +- ...arametersInVariableDeclarations.errors.txt | 12 +- ...rnalNamesInVariableDeclarations.errors.txt | 4 +- .../constructorReturnsInvalidType.errors.txt | 2 +- ...onstructorStaticParamNameErrors.errors.txt | 2 +- ...rWithAssignableReturnExpression.errors.txt | 4 +- ...uctorsWithSpecializedSignatures.errors.txt | 16 +- .../reference/contextualTyping.errors.txt | 6 +- .../reference/contextualTyping11.errors.txt | 6 +- .../reference/contextualTyping21.errors.txt | 6 +- .../reference/contextualTyping24.errors.txt | 6 +- .../reference/contextualTyping30.errors.txt | 4 +- .../reference/contextualTyping33.errors.txt | 4 +- .../reference/contextualTyping39.errors.txt | 4 +- .../reference/contextualTyping41.errors.txt | 4 +- .../reference/contextualTyping5.errors.txt | 4 +- .../contextualTypingOfAccessors.errors.txt | 4 +- ...ontextualTypingOfArrayLiterals1.errors.txt | 8 +- ...lTypingOfConditionalExpression2.errors.txt | 4 +- ...fGenericFunctionTypedArguments1.errors.txt | 4 +- ...lTypingOfLambdaReturnExpression.errors.txt | 4 +- ...ontextualTypingOfObjectLiterals.errors.txt | 6 +- ...ntextualTypingOfObjectLiterals2.errors.txt | 2 +- ...lTypingWithFixedTypeParameters1.errors.txt | 2 +- .../contextuallyTypingOrOperator3.errors.txt | 2 +- .../continueInIterationStatement4.errors.txt | 2 +- ...ontinueNotInIterationStatement1.errors.txt | 2 +- ...ontinueNotInIterationStatement2.errors.txt | 2 +- ...ontinueNotInIterationStatement3.errors.txt | 2 +- ...ontinueNotInIterationStatement4.errors.txt | 2 +- .../reference/continueTarget1.errors.txt | 2 +- .../reference/continueTarget5.errors.txt | 2 +- .../reference/continueTarget6.errors.txt | 2 +- .../copyrightWithNewLine1.errors.txt | 4 +- .../copyrightWithoutNewLine1.errors.txt | 4 +- .../couldNotSelectGenericOverload.errors.txt | 4 +- ...ertyIsRelatableToTargetProperty.errors.txt | 6 +- ...IntypeCheckInvocationExpression.errors.txt | 8 +- ...peCheckObjectCreationExpression.errors.txt | 2 +- .../crashOnMethodSignatures.errors.txt | 2 +- .../reference/crashRegressionTest.errors.txt | 2 +- .../reference/createArray.errors.txt | 14 +- .../reference/customEventDetail.errors.txt | 2 +- ...lFileObjectLiteralWithAccessors.errors.txt | 4 +- ...FileObjectLiteralWithOnlyGetter.errors.txt | 2 +- ...FileObjectLiteralWithOnlySetter.errors.txt | 2 +- .../declFilePrivateStatic.errors.txt | 8 +- .../reference/declInput-2.errors.txt | 10 +- .../baselines/reference/declInput.errors.txt | 2 +- ...clarationEmit_invalidReference2.errors.txt | 2 +- .../reference/declareAlreadySeen.errors.txt | 8 +- ...areClassInterfaceImplementation.errors.txt | 4 +- .../decrementAndIncrementOperators.errors.txt | 26 +- ...thAnyOtherTypeInvalidOperations.errors.txt | 88 +- ...orWithEnumTypeInvalidOperations.errors.txt | 20 +- ...WithNumberTypeInvalidOperations.errors.txt | 40 +- ...ratorWithUnsupportedBooleanType.errors.txt | 58 +- ...eratorWithUnsupportedStringType.errors.txt | 78 +- .../defaultArgsForwardReferencing.errors.txt | 20 +- ...efaultArgsInFunctionExpressions.errors.txt | 16 +- .../defaultArgsInOverloads.errors.txt | 10 +- ...defaultBestCommonTypesHaveDecls.errors.txt | 6 +- ...aultValueInConstructorOverload1.errors.txt | 2 +- ...defaultValueInFunctionOverload1.errors.txt | 2 +- .../defaultValueInFunctionTypes.errors.txt | 2 +- .../reference/deleteOperator1.errors.txt | 2 +- ...deleteOperatorInvalidOperations.errors.txt | 6 +- .../deleteOperatorWithAnyOtherType.errors.txt | 6 +- ...lassConstructorWithoutSuperCall.errors.txt | 10 +- ...ctionOverridesBaseClassAccessor.errors.txt | 12 +- ...edClassIncludesInheritedMembers.errors.txt | 8 +- ...dClassOverridesPrivateFunction1.errors.txt | 4 +- .../derivedClassOverridesPrivates.errors.txt | 8 +- ...ivedClassOverridesPublicMembers.errors.txt | 16 +- ...derivedClassParameterProperties.errors.txt | 8 +- ...perCallsInNonConstructorMembers.errors.txt | 28 +- ...rivedClassSuperCallsWithThisArg.errors.txt | 4 +- .../derivedClassTransitivity.errors.txt | 10 +- .../derivedClassTransitivity2.errors.txt | 10 +- .../derivedClassTransitivity3.errors.txt | 10 +- .../reference/derivedClassWithAny.errors.txt | 18 +- ...InstanceShadowingPublicInstance.errors.txt | 28 +- ...vateStaticShadowingPublicStatic.errors.txt | 20 +- ...ClassWithoutExplicitConstructor.errors.txt | 4 +- ...lassWithoutExplicitConstructor2.errors.txt | 4 +- ...lassWithoutExplicitConstructor3.errors.txt | 8 +- .../derivedGenericClassWithAny.errors.txt | 18 +- .../derivedInterfaceCallSignature.errors.txt | 6 +- ...faceIncompatibleWithBaseIndexer.errors.txt | 16 +- ...llingBaseImplWithOptionalParams.errors.txt | 2 +- ...rivedTypeIncompatibleSignatures.errors.txt | 12 +- ...edCommentAtStartOfFunctionBody1.errors.txt | 2 +- ...edCommentAtStartOfFunctionBody2.errors.txt | 2 +- .../directReferenceToNull.errors.txt | 2 +- .../directReferenceToUndefined.errors.txt | 2 +- ...ontShowCompilerGeneratedMembers.errors.txt | 12 +- .../reference/dottedModuleName.errors.txt | 6 +- .../duplicateClassElements.errors.txt | 36 +- .../duplicateExportAssignments.errors.txt | 24 +- ...duplicateIdentifierInCatchBlock.errors.txt | 8 +- ...ifiersAcrossContainerBoundaries.errors.txt | 6 +- .../duplicateInterfaceMembers1.errors.txt | 2 +- .../reference/duplicateLabel1.errors.txt | 2 +- .../reference/duplicateLabel2.errors.txt | 2 +- .../duplicateLocalVariable1.errors.txt | 2 +- .../duplicateLocalVariable2.errors.txt | 2 +- .../duplicateLocalVariable3.errors.txt | 2 +- .../duplicateLocalVariable4.errors.txt | 2 +- .../duplicateNumericIndexers.errors.txt | 16 +- .../duplicateObjectLiteralProperty.errors.txt | 18 +- ...duplicatePropertiesInStrictMode.errors.txt | 4 +- .../duplicatePropertyNames.errors.txt | 20 +- .../duplicateStringIndexers.errors.txt | 12 +- .../duplicateStringNamedProperty1.errors.txt | 2 +- .../duplicateSymbolsExportMatching.errors.txt | 36 +- .../duplicateTypeParameters1.errors.txt | 2 +- .../duplicateTypeParameters2.errors.txt | 2 +- .../duplicateTypeParameters3.errors.txt | 2 +- .../duplicateVarAndImport2.errors.txt | 2 +- .../duplicateVariablesWithAny.errors.txt | 8 +- ...plicateVarsAcrossFileBoundaries.errors.txt | 8 +- .../emitThisInSuperMethodCall.errors.txt | 6 +- .../emptyGenericParamList.errors.txt | 4 +- .../reference/emptyMemberAccess.errors.txt | 2 +- .../emptyTypeArgumentList.errors.txt | 4 +- .../emptyTypeArgumentListWithNew.errors.txt | 4 +- .../reference/enumAssignability.errors.txt | 56 +- .../enumAssignabilityInInheritance.errors.txt | 4 +- .../reference/enumAssignmentCompat.errors.txt | 14 +- .../enumAssignmentCompat2.errors.txt | 14 +- .../reference/enumBasics1.errors.txt | 4 +- ...umConflictsWithGlobalIdentifier.errors.txt | 4 +- .../reference/enumConstantMembers.errors.txt | 4 +- .../baselines/reference/enumErrors.errors.txt | 22 +- .../reference/enumGenericTypeClash.errors.txt | 2 +- .../enumIdenticalIdentifierValues.errors.txt | 2 +- .../enumInitializersWithExponents.errors.txt | 4 +- ...sNotASubtypeOfAnythingButNumber.errors.txt | 34 +- .../reference/enumMemberResolution.errors.txt | 4 +- .../reference/enumMergingErrors.errors.txt | 4 +- .../reference/enumPropertyAccess.errors.txt | 4 +- ...umWithParenthesizedInitializer1.errors.txt | 2 +- .../enumWithPrimitiveName.errors.txt | 6 +- ...tInitializerAfterComputedMember.errors.txt | 2 +- .../enumsWithMultipleDeclarations1.errors.txt | 4 +- .../enumsWithMultipleDeclarations2.errors.txt | 2 +- ...rdReferenceForwadingConstructor.errors.txt | 2 +- ...orLocationForInterfaceExtension.errors.txt | 2 +- ...errorMessageOnObjectLiteralType.errors.txt | 4 +- ...orOnContextuallyTypedReturnType.errors.txt | 6 +- .../reference/errorSuperCalls.errors.txt | 40 +- .../errorSuperPropertyAccess.errors.txt | 76 +- .../reference/errorSupression1.errors.txt | 2 +- .../errorTypesAsTypeArguments.errors.txt | 4 +- .../errorWithTruncatedType.errors.txt | 2 +- .../errorsInGenericTypeReference.errors.txt | 44 +- .../errorsOnImportedSymbol.errors.txt | 4 +- .../reference/es6ClassTest.errors.txt | 2 +- .../reference/es6ClassTest2.errors.txt | 6 +- .../reference/es6ClassTest3.errors.txt | 4 +- .../reference/es6ClassTest9.errors.txt | 6 +- .../reference/es6DeclOrdering.errors.txt | 4 +- .../reference/es6MemberScoping.errors.txt | 2 +- ...AnnotationAndInvalidInitializer.errors.txt | 68 +- .../reference/exportAlreadySeen.errors.txt | 20 +- .../exportAssignDottedName.errors.txt | 6 +- .../exportAssignImportedIdentifier.errors.txt | 2 +- .../exportAssignNonIdentifier.errors.txt | 18 +- .../reference/exportAssignTypes.errors.txt | 2 +- .../exportAssignmentAndDeclaration.errors.txt | 2 +- ...ssignmentConstrainedGenericType.errors.txt | 2 +- ...ignmentOfDeclaredExternalModule.errors.txt | 4 +- ...ntWithDeclareAndExportModifiers.errors.txt | 4 +- ...rtAssignmentWithDeclareModifier.errors.txt | 4 +- ...ortAssignmentWithExportModifier.errors.txt | 4 +- .../exportAssignmentWithExports.errors.txt | 2 +- ...ortAssignmentWithoutIdentifier1.errors.txt | 2 +- .../reference/exportDeclareClass1.errors.txt | 8 +- .../reference/exportDeclaredModule.errors.txt | 2 +- .../reference/exportEqualErrorType.errors.txt | 2 +- .../exportEqualMemberMissing.errors.txt | 2 +- .../reference/exportNonVisibleType.errors.txt | 2 +- .../exportSameNameFuncVar.errors.txt | 2 +- .../exportingContainingVisibleType.errors.txt | 2 +- tests/baselines/reference/expr.errors.txt | 138 +- .../reference/extBaseClass2.errors.txt | 4 +- ...endAndImplementTheSameBaseType2.errors.txt | 12 +- .../reference/extendArray.errors.txt | 4 +- .../reference/extendGenericArray.errors.txt | 2 +- .../reference/extendGenericArray2.errors.txt | 2 +- .../extendNonClassSymbol1.errors.txt | 2 +- .../extendNonClassSymbol2.errors.txt | 2 +- ...acesWithDuplicateTypeParameters.errors.txt | 6 +- .../extendsClauseAlreadySeen.errors.txt | 8 +- .../extendsClauseAlreadySeen2.errors.txt | 6 +- .../baselines/reference/extension.errors.txt | 10 +- .../reference/externModule.errors.txt | 26 +- .../reference/externSemantics.errors.txt | 4 +- .../reference/externSyntax.errors.txt | 2 +- ...rnalModuleExportingGenericClass.errors.txt | 2 +- ...olutionOrderInImportDeclaration.errors.txt | 2 +- ...ernalModuleWithoutCompilerFlag1.errors.txt | 2 +- .../fatarrowfunctionsErrors.errors.txt | 36 +- .../fatarrowfunctionsOptionalArgs.errors.txt | 18 +- ...rowfunctionsOptionalArgsErrors1.errors.txt | 10 +- ...rowfunctionsOptionalArgsErrors2.errors.txt | 34 +- .../fieldAndGetterWithSameName.errors.txt | 4 +- .../reference/for-inStatements.errors.txt | 2 +- .../for-inStatementsInvalid.errors.txt | 32 +- tests/baselines/reference/for.errors.txt | 2 +- tests/baselines/reference/forIn.errors.txt | 4 +- tests/baselines/reference/forIn2.errors.txt | 2 +- .../reference/forInStatement2.errors.txt | 2 +- .../reference/forInStatement4.errors.txt | 2 +- .../reference/forInStatement7.errors.txt | 2 +- ...orStatementsMultipleInvalidDecl.errors.txt | 24 +- .../reference/forgottenNew.errors.txt | 2 +- .../baselines/reference/funClodule.errors.txt | 6 +- ...nAndInterfaceWithSeparateErrors.errors.txt | 4 +- ...functionAndPropertyNameConflict.errors.txt | 4 +- .../reference/functionArgShadowing.errors.txt | 6 +- .../reference/functionAssignment.errors.txt | 4 +- .../reference/functionCall10.errors.txt | 4 +- .../reference/functionCall11.errors.txt | 6 +- .../reference/functionCall12.errors.txt | 6 +- .../reference/functionCall13.errors.txt | 4 +- .../reference/functionCall14.errors.txt | 2 +- .../reference/functionCall15.errors.txt | 2 +- .../reference/functionCall16.errors.txt | 6 +- .../reference/functionCall17.errors.txt | 8 +- .../reference/functionCall6.errors.txt | 6 +- .../reference/functionCall7.errors.txt | 6 +- .../reference/functionCall8.errors.txt | 4 +- .../reference/functionCall9.errors.txt | 4 +- .../reference/functionCalls.errors.txt | 18 +- ...functionConstraintSatisfaction2.errors.txt | 28 +- .../functionExpressionInWithBlock.errors.txt | 2 +- ...ctionExpressionShadowedByParams.errors.txt | 4 +- .../functionImplementationErrors.errors.txt | 16 +- .../functionNameConflicts.errors.txt | 12 +- .../functionOverloadAmbiguity1.errors.txt | 2 +- .../functionOverloadErrors.errors.txt | 28 +- .../functionOverloadErrorsSyntax.errors.txt | 6 +- ...erloadImplementationOfWrongName.errors.txt | 2 +- ...rloadImplementationOfWrongName2.errors.txt | 4 +- .../reference/functionOverloads.errors.txt | 2 +- .../reference/functionOverloads1.errors.txt | 2 +- .../reference/functionOverloads11.errors.txt | 2 +- .../reference/functionOverloads17.errors.txt | 2 +- .../reference/functionOverloads18.errors.txt | 2 +- .../reference/functionOverloads19.errors.txt | 2 +- .../reference/functionOverloads2.errors.txt | 2 +- .../reference/functionOverloads20.errors.txt | 2 +- .../reference/functionOverloads22.errors.txt | 2 +- .../reference/functionOverloads27.errors.txt | 2 +- .../reference/functionOverloads29.errors.txt | 2 +- .../reference/functionOverloads3.errors.txt | 2 +- .../reference/functionOverloads34.errors.txt | 2 +- .../reference/functionOverloads37.errors.txt | 2 +- .../reference/functionOverloads4.errors.txt | 2 +- .../reference/functionOverloads40.errors.txt | 8 +- .../reference/functionOverloads41.errors.txt | 6 +- .../reference/functionOverloads5.errors.txt | 2 +- .../functionOverloadsOutOfOrder.errors.txt | 4 +- ...ctionSignatureAssignmentCompat1.errors.txt | 6 +- ...tionTypeArgumentArrayAssignment.errors.txt | 2 +- ...ionTypeArgumentAssignmentCompat.errors.txt | 2 +- ...ionWithMultipleReturnStatements.errors.txt | 18 +- .../functionWithSameNameAsField.errors.txt | 2 +- .../functionWithThrowButNoReturn1.errors.txt | 2 +- ...gReturnStatementsAndExpressions.errors.txt | 10 +- .../funduleSplitAcrossFiles.errors.txt | 2 +- tests/baselines/reference/fuzzy.errors.txt | 14 +- ...GenericInterfaceWithTheSameName.errors.txt | 6 +- .../genericArrayAssignment1.errors.txt | 4 +- ...ericArrayAssignmentCompatErrors.errors.txt | 4 +- .../genericArrayExtenstions.errors.txt | 6 +- .../reference/genericArrayMethods1.errors.txt | 4 +- ...nericArrayWithoutTypeAnnotation.errors.txt | 2 +- ...mentCompatOfFunctionSignatures1.errors.txt | 4 +- ...AssignmentCompatWithInterfaces1.errors.txt | 56 +- ...genericCallSpecializedToTypeArg.errors.txt | 2 +- ...nstraintsTypeArgumentInference2.errors.txt | 4 +- ...lWithConstructorTypedArguments5.errors.txt | 4 +- ...CallWithFunctionTypedArguments5.errors.txt | 12 +- ...lWithGenericSignatureArguments2.errors.txt | 8 +- ...CallWithObjectLiteralArguments1.errors.txt | 24 +- ...thObjectTypeArgsAndConstraints3.errors.txt | 2 +- ...thObjectTypeArgsAndConstraints4.errors.txt | 6 +- ...thObjectTypeArgsAndConstraints5.errors.txt | 6 +- ...ObjectTypeArgsAndIndexersErrors.errors.txt | 6 +- ...thObjectTypeArgsAndInitializers.errors.txt | 22 +- ...oadedConstructorTypedArguments2.errors.txt | 2 +- ...erloadedFunctionTypedArguments2.errors.txt | 2 +- .../genericCallWithoutArgs.errors.txt | 8 +- ...kedInsideItsContainingFunction1.errors.txt | 16 +- .../genericCallsWithoutParens.errors.txt | 8 +- .../reference/genericChainedCalls.errors.txt | 4 +- ...ssWithStaticsUsingTypeArguments.errors.txt | 14 +- .../genericClassesRedeclaration.errors.txt | 6 +- .../genericCloduleInModule2.errors.txt | 2 +- .../genericCloneReturnTypes.errors.txt | 4 +- .../genericCloneReturnTypes2.errors.txt | 4 +- .../reference/genericCombinators2.errors.txt | 4 +- .../reference/genericConstraint1.errors.txt | 2 +- .../reference/genericConstraint2.errors.txt | 10 +- .../reference/genericConstraint3.errors.txt | 2 +- .../genericConstraintSatisfaction1.errors.txt | 6 +- ...cConstructExpressionWithoutArgs.errors.txt | 4 +- ...onstructInvocationWithNoTypeArg.errors.txt | 2 +- .../genericConstructorFunction1.errors.txt | 4 +- ...cDerivedTypeWithSpecializedBase.errors.txt | 6 +- ...DerivedTypeWithSpecializedBase2.errors.txt | 8 +- ...CallSignatureReturnTypeMismatch.errors.txt | 2 +- ...cFunctionTypedArgumentsAreFixed.errors.txt | 2 +- ...unctionsWithOptionalParameters2.errors.txt | 2 +- .../genericFunduleInModule.errors.txt | 2 +- .../genericFunduleInModule2.errors.txt | 2 +- .../reference/genericGetter.errors.txt | 4 +- .../reference/genericGetter2.errors.txt | 4 +- .../reference/genericGetter3.errors.txt | 4 +- ...cInterfacesWithoutTypeArguments.errors.txt | 4 +- ...ricLambaArgWithoutTypeArguments.errors.txt | 2 +- .../genericMemberFunction.errors.txt | 16 +- ...edDeclarationUsingTypeParameter.errors.txt | 6 +- ...dDeclarationUsingTypeParameter2.errors.txt | 4 +- .../reference/genericNewInterface.errors.txt | 4 +- ...icObjectCreationWithoutTypeArgs.errors.txt | 4 +- ...rsiveImplicitConstructorErrors1.errors.txt | 2 +- ...rsiveImplicitConstructorErrors3.errors.txt | 16 +- .../reference/genericReduce.errors.txt | 6 +- .../reference/genericRestArgs.errors.txt | 4 +- .../genericReturnTypeFromGetter1.errors.txt | 4 +- .../genericSpecializations2.errors.txt | 4 +- .../genericSpecializations3.errors.txt | 30 +- .../genericTypeAssertions1.errors.txt | 14 +- .../genericTypeAssertions2.errors.txt | 18 +- .../genericTypeAssertions4.errors.txt | 10 +- .../genericTypeAssertions5.errors.txt | 10 +- .../genericTypeAssertions6.errors.txt | 6 +- ...eReferenceWithoutTypeArgument.d.errors.txt | 28 +- ...ypeReferenceWithoutTypeArgument.errors.txt | 48 +- ...peReferenceWithoutTypeArgument2.errors.txt | 48 +- ...peReferenceWithoutTypeArgument3.errors.txt | 28 +- ...icTypeReferencesRequireTypeArgs.errors.txt | 8 +- ...icTypeUsedWithoutTypeArguments1.errors.txt | 2 +- ...icTypeUsedWithoutTypeArguments3.errors.txt | 2 +- ...cTypeWithNonGenericBaseMisMatch.errors.txt | 28 +- .../genericWithOpenTypeParameters1.errors.txt | 6 +- .../baselines/reference/generics1.errors.txt | 8 +- .../baselines/reference/generics2.errors.txt | 8 +- .../baselines/reference/generics4.errors.txt | 10 +- .../baselines/reference/generics5.errors.txt | 4 +- ...icsWithDuplicateTypeParameters1.errors.txt | 20 +- .../genericsWithoutTypeParameters1.errors.txt | 30 +- ...ReturnTypeAndFunctionClassMerge.errors.txt | 8 +- .../getAndSetAsMemberNames.errors.txt | 2 +- .../getAndSetNotIdenticalType.errors.txt | 8 +- .../getAndSetNotIdenticalType2.errors.txt | 12 +- .../getAndSetNotIdenticalType3.errors.txt | 12 +- .../reference/getsetReturnTypes.errors.txt | 2 +- .../getterMissingReturnError.errors.txt | 4 +- ...erThatThrowsShouldNotNeedReturn.errors.txt | 2 +- .../reference/gettersAndSetters.errors.txt | 16 +- .../gettersAndSettersAccessibility.errors.txt | 8 +- .../gettersAndSettersErrors.errors.txt | 18 +- .../gettersAndSettersTypesAgree.errors.txt | 16 +- tests/baselines/reference/giant.errors.txt | 454 +++---- .../reference/grammarAmbiguities.errors.txt | 4 +- .../reference/grammarAmbiguities1.errors.txt | 12 +- .../heterogeneousArrayAndOverloads.errors.txt | 4 +- tests/baselines/reference/i3.errors.txt | 4 +- ...naturesWithTypeParametersAndAny.errors.txt | 8 +- .../ifElseWithStatements1.errors.txt | 4 +- ...illegalModifiersOnClassElements.errors.txt | 4 +- .../illegalSuperCallsInConstructor.errors.txt | 16 +- ...implementClausePrecedingExtends.errors.txt | 8 +- ...ementGenericWithMismatchedTypes.errors.txt | 18 +- ...mplementPublicPropertyAsPrivate.errors.txt | 4 +- ...rfaceExtendingClassWithPrivates.errors.txt | 16 +- ...faceExtendingClassWithPrivates2.errors.txt | 56 +- .../implementsClauseAlreadySeen.errors.txt | 12 +- .../reference/implicitAnyAmbients.errors.txt | 18 +- .../implicitAnyCastedValue.errors.txt | 18 +- ...reFunctionExprWithoutFormalType.errors.txt | 16 +- ...eclareFunctionWithoutFormalType.errors.txt | 16 +- ...icitAnyDeclareMemberWithoutType.errors.txt | 16 +- ...citAnyDeclareMemberWithoutType2.errors.txt | 10 +- ...yDeclareTypePropertyWithoutType.errors.txt | 12 +- ...lareVariablesWithoutTypeAndInit.errors.txt | 6 +- ...tionInvocationWithAnyArguements.errors.txt | 14 +- ...erloadWithImplicitAnyReturnType.errors.txt | 2 +- ...nyFunctionReturnNullOrUndefined.errors.txt | 8 +- ...implicitAnyGenericTypeInference.errors.txt | 4 +- ...AndSetAccessorWithAnyReturnType.errors.txt | 16 +- ...implicitAnyInAmbientDeclaration.errors.txt | 8 +- ...licitAnyInAmbientDeclaration2.d.errors.txt | 16 +- ...NewExprLackConstructorSignature.errors.txt | 2 +- .../implicitAnyWidenToAny.errors.txt | 8 +- ...nalModuleInsideAnInternalModule.errors.txt | 2 +- .../reference/importAnImport.errors.txt | 2 +- ...AndVariableDeclarationConflict1.errors.txt | 2 +- ...AndVariableDeclarationConflict3.errors.txt | 2 +- ...AndVariableDeclarationConflict4.errors.txt | 2 +- .../reference/importAsBaseClass.errors.txt | 2 +- ...eingExternalModuleWithNoResolve.errors.txt | 8 +- .../importDeclWithClassModifiers.errors.txt | 12 +- .../importDeclWithDeclareModifier.errors.txt | 8 +- ...DeclareModifierInAmbientContext.errors.txt | 6 +- .../importDeclWithExportModifier.errors.txt | 2 +- ...portModifierAndExportAssignment.errors.txt | 4 +- ...xportAssignmentInAmbientContext.errors.txt | 2 +- .../reference/importInsideModule.errors.txt | 4 +- .../importNonExternalModule.errors.txt | 2 +- .../importNonStringLiteral.errors.txt | 4 +- .../importStatementsInterfaces.errors.txt | 2 +- .../reference/importTsBeforeDTs.errors.txt | 2 +- .../importedModuleAddToGlobal.errors.txt | 2 +- .../baselines/reference/inOperator.errors.txt | 2 +- .../inOperatorWithInvalidOperands.errors.txt | 40 +- .../reference/incompatibleExports1.errors.txt | 4 +- .../reference/incompatibleExports2.errors.txt | 2 +- .../incompatibleGenericTypes.errors.txt | 4 +- .../reference/incompatibleTypes.errors.txt | 46 +- ...incompleteDottedExpressionAtEOF.errors.txt | 4 +- .../incompleteObjectLiteral1.errors.txt | 4 +- .../incorrectClassOverloadChain.errors.txt | 2 +- .../incrementAndDecrement.errors.txt | 42 +- .../incrementOnTypeParameter.errors.txt | 4 +- ...thAnyOtherTypeInvalidOperations.errors.txt | 84 +- ...orWithEnumTypeInvalidOperations.errors.txt | 20 +- ...WithNumberTypeInvalidOperations.errors.txt | 40 +- ...ratorWithUnsupportedBooleanType.errors.txt | 58 +- ...eratorWithUnsupportedStringType.errors.txt | 78 +- .../indexIntoArraySubclass.errors.txt | 2 +- ...SignatureMustHaveTypeAnnotation.errors.txt | 8 +- .../indexSignatureTypeCheck.errors.txt | 8 +- .../indexSignatureTypeCheck2.errors.txt | 8 +- .../indexSignatureTypeInference.errors.txt | 2 +- ...natureWithAccessibilityModifier.errors.txt | 8 +- .../indexSignatureWithInitializer.errors.txt | 8 +- .../reference/indexTypeCheck.errors.txt | 16 +- .../indexWithoutParamType.errors.txt | 2 +- .../indexWithoutParamType2.errors.txt | 2 +- .../baselines/reference/indexer2A.errors.txt | 2 +- .../reference/indexerAsOptional.errors.txt | 4 +- .../reference/indexerAssignability.errors.txt | 12 +- .../reference/indexerConstraints.errors.txt | 8 +- .../reference/indexerConstraints2.errors.txt | 6 +- .../indexerSignatureWithRestParam.errors.txt | 4 +- .../indirectSelfReference.errors.txt | 2 +- .../indirectSelfReferenceGeneric.errors.txt | 2 +- .../reference/inferSetterParamType.errors.txt | 10 +- ...pingWithObjectLiteralProperties.errors.txt | 4 +- ...edFunctionReturnTypeIsEmptyType.errors.txt | 2 +- ...teExpansionThroughInstantiation.errors.txt | 12 +- ...eExpansionThroughInstantiation2.errors.txt | 2 +- .../infinitelyExpandingOverloads.errors.txt | 2 +- .../infinitelyExpandingTypes1.errors.txt | 2 +- .../infinitelyExpandingTypes2.errors.txt | 2 +- ...inheritFromGenericTypeParameter.errors.txt | 4 +- ...ePropertiesFromDifferentOrigins.errors.txt | 4 +- ...pertiesWithDifferentOptionality.errors.txt | 4 +- ...opertiesWithDifferentVisibility.errors.txt | 4 +- .../reference/inheritance.errors.txt | 8 +- .../reference/inheritance1.errors.txt | 44 +- ...andParentPrivateMemberCollision.errors.txt | 4 +- ...MemberCollisionWithPublicMember.errors.txt | 4 +- ...emberCollisionWithPrivateMember.errors.txt | 4 +- ...emberAccessorOverridingAccessor.errors.txt | 8 +- ...eMemberAccessorOverridingMethod.errors.txt | 12 +- ...emberAccessorOverridingProperty.errors.txt | 4 +- ...nceMemberFuncOverridingAccessor.errors.txt | 12 +- ...nceMemberFuncOverridingProperty.errors.txt | 2 +- ...emberPropertyOverridingAccessor.errors.txt | 4 +- ...eMemberPropertyOverridingMethod.errors.txt | 2 +- ...taticAccessorOverridingAccessor.errors.txt | 8 +- ...eStaticAccessorOverridingMethod.errors.txt | 10 +- ...taticAccessorOverridingProperty.errors.txt | 4 +- ...nceStaticFuncOverridingAccessor.errors.txt | 10 +- ...uncOverridingAccessorOfFuncType.errors.txt | 2 +- ...nceStaticFuncOverridingProperty.errors.txt | 6 +- ...itanceStaticMembersIncompatible.errors.txt | 6 +- ...taticPropertyOverridingAccessor.errors.txt | 4 +- ...eStaticPropertyOverridingMethod.errors.txt | 6 +- ...eritedConstructorWithRestParams.errors.txt | 4 +- ...ritedConstructorWithRestParams2.errors.txt | 6 +- ...dexSignaturesFromDifferentBases.errors.txt | 12 +- ...nheritedModuleMembersForClodule.errors.txt | 8 +- ...gIndexersFromDifferentBaseTypes.errors.txt | 12 +- ...IndexersFromDifferentBaseTypes2.errors.txt | 2 +- ...zerReferencingConstructorLocals.errors.txt | 24 +- ...eferencingConstructorParameters.errors.txt | 12 +- .../initializersInDeclarations.errors.txt | 14 +- .../reference/innerAliases.errors.txt | 4 +- .../reference/innerModExport1.errors.txt | 10 +- .../reference/innerModExport2.errors.txt | 12 +- .../innerTypeCheckOfLambdaArgument.errors.txt | 2 +- ...ceMemberAssignsToClassPrototype.errors.txt | 4 +- ...ropertiesInheritedIntoClassType.errors.txt | 12 +- .../instancePropertyInClassType.errors.txt | 12 +- .../instanceSubtypeCheck2.errors.txt | 8 +- .../reference/instanceofOperator.errors.txt | 12 +- ...ceofOperatorWithInvalidOperands.errors.txt | 42 +- ...iateConstraintsToTypeArguments2.errors.txt | 8 +- ...sWithWrongNumberOfTypeArguments.errors.txt | 4 +- ...NonGenericTypeWithTypeArguments.errors.txt | 12 +- .../instantiateTypeParameter.errors.txt | 8 +- ...instantiatedBaseTypeConstraints.errors.txt | 2 +- ...nstantiatedBaseTypeConstraints2.errors.txt | 4 +- .../reference/intTypeCheck.errors.txt | 182 +-- .../interfaceAssignmentCompat.errors.txt | 12 +- .../interfaceDeclaration1.errors.txt | 16 +- .../interfaceDeclaration2.errors.txt | 2 +- .../interfaceDeclaration3.errors.txt | 18 +- .../interfaceDeclaration4.errors.txt | 20 +- .../interfaceDeclaration6.errors.txt | 6 +- .../interfaceExtendingClass.errors.txt | 2 +- .../interfaceExtendingClass2.errors.txt | 12 +- ...rfaceExtendingClassWithPrivates.errors.txt | 6 +- ...faceExtendingClassWithPrivates2.errors.txt | 16 +- ...terfaceExtendsClassWithPrivate1.errors.txt | 12 +- ...terfaceExtendsClassWithPrivate2.errors.txt | 16 +- .../interfaceImplementation1.errors.txt | 10 +- .../interfaceImplementation2.errors.txt | 4 +- .../interfaceImplementation3.errors.txt | 4 +- .../interfaceImplementation4.errors.txt | 4 +- .../interfaceImplementation5.errors.txt | 16 +- .../interfaceImplementation6.errors.txt | 8 +- .../interfaceImplementation7.errors.txt | 14 +- .../interfaceImplementation8.errors.txt | 12 +- .../reference/interfaceInheritance.errors.txt | 20 +- ...terfaceMayNotBeExtendedWitACall.errors.txt | 4 +- .../interfaceMemberValidation.errors.txt | 10 +- .../interfaceNameAsIdentifier.errors.txt | 4 +- .../reference/interfaceNaming1.errors.txt | 8 +- ...nterfacePropertiesWithSameName2.errors.txt | 8 +- ...nterfacePropertiesWithSameName3.errors.txt | 8 +- ...interfaceThatHidesBaseProperty2.errors.txt | 10 +- ...hatIndirectlyInheritsFromItself.errors.txt | 4 +- ...interfaceThatInheritsFromItself.errors.txt | 16 +- .../interfaceWithImplements1.errors.txt | 10 +- .../interfaceWithMultipleBaseTypes.errors.txt | 50 +- ...interfaceWithMultipleBaseTypes2.errors.txt | 10 +- ...terfaceWithMultipleDeclarations.errors.txt | 30 +- .../interfaceWithPrivateMember.errors.txt | 10 +- ...PropertyThatIsPrivateInBaseType.errors.txt | 8 +- ...ropertyThatIsPrivateInBaseType2.errors.txt | 8 +- ...ingIndexerHidingBaseTypeIndexer.errors.txt | 2 +- ...ngIndexerHidingBaseTypeIndexer2.errors.txt | 2 +- ...ngIndexerHidingBaseTypeIndexer3.errors.txt | 2 +- .../interfacedeclWithIndexerErrors.errors.txt | 10 +- ...facesWithPredefinedTypesAsNames.errors.txt | 10 +- ...lModuleWithoutExportAccessError.errors.txt | 2 +- ...lModuleWithoutExportAccessError.errors.txt | 2 +- ...lModuleWithoutExportAccessError.errors.txt | 2 +- ...lModuleWithoutExportAccessError.errors.txt | 2 +- ...lModuleWithoutExportAccessError.errors.txt | 2 +- ...lModuleWithoutExportAccessError.errors.txt | 2 +- ...lModuleWithoutExportAccessError.errors.txt | 2 +- ...WithClassNotReferencingInstance.errors.txt | 2 +- ...tedModuleNotReferencingInstance.errors.txt | 2 +- ...WithClassNotReferencingInstance.errors.txt | 2 +- .../baselines/reference/intrinsics.errors.txt | 4 +- .../invalidAssignmentsToVoid.errors.txt | 20 +- .../invalidBooleanAssignments.errors.txt | 24 +- .../reference/invalidConstraint1.errors.txt | 2 +- .../invalidDoWhileBreakStatements.errors.txt | 12 +- ...nvalidDoWhileContinueStatements.errors.txt | 12 +- .../invalidEnumAssignments.errors.txt | 12 +- .../invalidForBreakStatements.errors.txt | 12 +- .../invalidForContinueStatements.errors.txt | 12 +- .../invalidForInBreakStatements.errors.txt | 12 +- .../invalidForInContinueStatements.errors.txt | 12 +- .../invalidImportAliasIdentifiers.errors.txt | 8 +- .../invalidInstantiatedModule.errors.txt | 4 +- ...ModuleWithStatementsOfEveryKind.errors.txt | 42 +- .../invalidModuleWithVarStatements.errors.txt | 12 +- ...lidMultipleVariableDeclarations.errors.txt | 24 +- .../reference/invalidNestedModules.errors.txt | 4 +- .../invalidNumberAssignments.errors.txt | 28 +- .../invalidReferenceSyntax1.errors.txt | 2 +- .../invalidReturnStatements.errors.txt | 16 +- .../reference/invalidStaticField.errors.txt | 2 +- .../invalidStringAssignments.errors.txt | 30 +- .../invalidSwitchContinueStatement.errors.txt | 2 +- .../invalidSymbolInTypeParameter1.errors.txt | 2 +- .../invalidThrowStatement.errors.txt | 4 +- .../invalidTripleSlashReference.errors.txt | 4 +- .../reference/invalidTryStatements.errors.txt | 6 +- .../invalidTryStatements2.errors.txt | 12 +- .../reference/invalidTypeOfTarget.errors.txt | 18 +- .../invalidUndefinedAssignments.errors.txt | 12 +- .../invalidUnicodeEscapeSequance.errors.txt | 2 +- .../invalidUnicodeEscapeSequance2.errors.txt | 2 +- .../invalidUnicodeEscapeSequance3.errors.txt | 6 +- .../invalidUnicodeEscapeSequance4.errors.txt | 2 +- .../invalidVoidAssignments.errors.txt | 30 +- .../reference/invalidVoidValues.errors.txt | 22 +- .../invalidWhileBreakStatements.errors.txt | 12 +- .../invalidWhileContinueStatements.errors.txt | 12 +- ...onExpressionInFunctionParameter.errors.txt | 2 +- ...GenericMethodWithTypeArguments1.errors.txt | 2 +- ...GenericMethodWithTypeArguments2.errors.txt | 2 +- tests/baselines/reference/knockout.errors.txt | 2 +- .../reference/lambdaArgCrash.errors.txt | 4 +- .../reference/lambdaParamTypes.errors.txt | 12 +- .../reference/lambdaPropSelf.errors.txt | 2 +- .../lastPropertyInLiteralWins.errors.txt | 14 +- .../baselines/reference/libMembers.errors.txt | 6 +- tests/baselines/reference/lift.errors.txt | 8 +- .../reference/literals-negative.errors.txt | 2 +- tests/baselines/reference/literals.errors.txt | 12 +- .../logicalNotExpression1.errors.txt | 2 +- ...calNotOperatorInvalidOperations.errors.txt | 8 +- ...icalNotOperatorWithAnyOtherType.errors.txt | 6 +- .../matchReturnTypeInAllBranches.errors.txt | 2 +- ...chingOfObjectLiteralConstraints.errors.txt | 2 +- .../reference/maxConstraints.errors.txt | 4 +- ...OverloadMixingStaticAndInstance.errors.txt | 16 +- ...erFunctionsWithPrivateOverloads.errors.txt | 8 +- ...tionsWithPublicPrivateOverloads.errors.txt | 20 +- .../reference/memberOverride.errors.txt | 4 +- .../reference/memberScope.errors.txt | 2 +- .../reference/mergedDeclarations2.errors.txt | 2 +- .../reference/mergedDeclarations3.errors.txt | 4 +- ...cesWithConflictingPropertyNames.errors.txt | 6 +- ...esWithConflictingPropertyNames2.errors.txt | 6 +- .../mergedInterfacesWithIndexers2.errors.txt | 6 +- ...InterfacesWithInheritedPrivates.errors.txt | 10 +- ...nterfacesWithInheritedPrivates2.errors.txt | 16 +- ...nterfacesWithInheritedPrivates3.errors.txt | 8 +- ...gedInterfacesWithMultipleBases4.errors.txt | 4 +- .../mergedModuleDeclarationCodeGen.errors.txt | 2 +- .../methodSignaturesWithOverloads.errors.txt | 4 +- ...matchedClassConstructorVariable.errors.txt | 2 +- ...citTypeParameterAndArgumentType.errors.txt | 6 +- .../missingRequiredDeclare.d.errors.txt | 4 +- .../missingReturnStatement.errors.txt | 2 +- .../missingReturnStatement1.errors.txt | 2 +- .../missingTypeArguments1.errors.txt | 20 +- .../missingTypeArguments2.errors.txt | 8 +- ...ixingStaticAndInstanceOverloads.errors.txt | 12 +- .../moduleAndInterfaceSharingName2.errors.txt | 2 +- .../moduleAndInterfaceWithSameName.errors.txt | 2 +- .../reference/moduleAsBaseType.errors.txt | 6 +- .../moduleAssignmentCompat1.errors.txt | 4 +- .../moduleAssignmentCompat2.errors.txt | 4 +- .../moduleAssignmentCompat3.errors.txt | 4 +- .../moduleAssignmentCompat4.errors.txt | 4 +- .../moduleClassArrayCodeGenTest.errors.txt | 2 +- .../reference/moduleCrashBug1.errors.txt | 2 +- .../reference/moduleExports1.errors.txt | 4 +- .../reference/moduleImport.errors.txt | 2 +- .../moduleInTypePosition1.errors.txt | 2 +- .../moduleKeywordRepeatError.errors.txt | 4 +- .../reference/moduleNewExportBug.errors.txt | 2 +- .../reference/moduleProperty1.errors.txt | 6 +- .../reference/moduleProperty2.errors.txt | 4 +- .../reference/moduleScoping.errors.txt | 2 +- .../moduleVisibilityTest2.errors.txt | 12 +- .../moduleVisibilityTest3.errors.txt | 6 +- .../moduleWithNoValuesAsType.errors.txt | 6 +- .../moduleWithValuesAsType.errors.txt | 2 +- ..._augmentExistingAmbientVariable.errors.txt | 2 +- .../module_augmentExistingVariable.errors.txt | 2 +- .../baselines/reference/moduledecl.errors.txt | 4 +- .../multiExtendsSplitInterfaces1.errors.txt | 2 +- .../reference/multiLineErrors.errors.txt | 12 +- ...rfaesWithIncompatibleProperties.errors.txt | 4 +- .../multipleClassPropertyModifiers.errors.txt | 4 +- ...pleClassPropertyModifiersErrors.errors.txt | 10 +- .../multipleExportAssignments.errors.txt | 4 +- ...AssignmentsInAmbientDeclaration.errors.txt | 4 +- .../reference/multipleInheritance.errors.txt | 16 +- .../multipleNumericIndexers.errors.txt | 16 +- .../multipleStringIndexers.errors.txt | 12 +- tests/baselines/reference/multivar.errors.txt | 4 +- .../reference/nameCollisions.errors.txt | 18 +- .../nameWithFileExtension.errors.txt | 2 +- ...medFunctionExpressionCallErrors.errors.txt | 6 +- ...negateOperatorInvalidOperations.errors.txt | 20 +- .../nestedClassDeclaration.errors.txt | 16 +- .../newExpressionWithCast.errors.txt | 8 +- .../newFunctionImplicitAny.errors.txt | 2 +- .../reference/newMissingIdentifier.errors.txt | 2 +- .../reference/newNonReferenceType.errors.txt | 4 +- .../reference/newOnInstanceSymbol.errors.txt | 2 +- .../reference/newOperator.errors.txt | 22 +- .../newOperatorErrorCases.errors.txt | 8 +- ...xpressionAndLocalVarInAccessors.errors.txt | 8 +- .../reference/noDefaultLib.errors.txt | 6 +- .../reference/noErrorsInCallback.errors.txt | 4 +- .../reference/noImplicitAnyForIn.errors.txt | 10 +- ...oImplicitAnyForMethodParameters.errors.txt | 8 +- ...itAnyForwardReferencedInterface.errors.txt | 2 +- ...AnyFunctionExpressionAssignment.errors.txt | 4 +- .../noImplicitAnyFunctions.errors.txt | 10 +- .../noImplicitAnyInBareInterface.errors.txt | 4 +- .../noImplicitAnyInCastExpression.errors.txt | 4 +- .../noImplicitAnyIndexing.errors.txt | 8 +- .../reference/noImplicitAnyModule.errors.txt | 8 +- ...icitAnyParametersInAmbientClass.errors.txt | 62 +- ...AnyParametersInAmbientFunctions.errors.txt | 44 +- ...citAnyParametersInAmbientModule.errors.txt | 44 +- ...citAnyParametersInBareFunctions.errors.txt | 44 +- .../noImplicitAnyParametersInClass.errors.txt | 88 +- ...mplicitAnyParametersInInterface.errors.txt | 54 +- ...noImplicitAnyParametersInModule.errors.txt | 44 +- ...AnyReferencingDeclaredInterface.errors.txt | 2 +- ...mplicitAnyStringIndexerOnObject.errors.txt | 2 +- .../noImplicitAnyWithOverloads.errors.txt | 8 +- .../noTypeArgumentOnReturnType1.errors.txt | 2 +- .../reference/nonArrayRestArgs.errors.txt | 2 +- .../nonContextuallyTypedLogicalOr.errors.txt | 2 +- ...ExportedElementsOfMergedModules.errors.txt | 2 +- .../nullAssignedToUndefined.errors.txt | 2 +- .../reference/nullKeyword.errors.txt | 2 +- tests/baselines/reference/numLit.errors.txt | 4 +- .../reference/numberToString.errors.txt | 4 +- .../reference/numericClassMembers1.errors.txt | 4 +- .../numericIndexExpressions.errors.txt | 8 +- ...rConstrainsPropertyDeclarations.errors.txt | 32 +- ...ConstrainsPropertyDeclarations2.errors.txt | 20 +- .../numericIndexerConstraint.errors.txt | 2 +- .../numericIndexerConstraint1.errors.txt | 4 +- .../numericIndexerConstraint2.errors.txt | 4 +- .../numericIndexerConstraint5.errors.txt | 4 +- .../numericIndexerTyping1.errors.txt | 4 +- .../numericIndexerTyping2.errors.txt | 4 +- .../numericNamedPropertyDuplicates.errors.txt | 12 +- ...cStringNamedPropertyEquivalence.errors.txt | 8 +- ...onExpressionInFunctionParameter.errors.txt | 4 +- ...eationOfElementAccessExpression.errors.txt | 8 +- .../objectLitArrayDeclNoNew.errors.txt | 4 +- .../objectLitIndexerContextualType.errors.txt | 12 +- .../objectLitPropertyScoping.errors.txt | 4 +- ...objectLitStructuralTypeMismatch.errors.txt | 4 +- .../objectLitTargetTypeCallSite.errors.txt | 6 +- .../reference/objectLiteralErrors.errors.txt | 122 +- .../objectLiteralErrorsES3.errors.txt | 8 +- ...eralFunctionArgContextualTyping.errors.txt | 14 +- ...ralFunctionArgContextualTyping2.errors.txt | 24 +- .../objectLiteralGettersAndSetters.errors.txt | 68 +- .../objectLiteralIndexerErrors.errors.txt | 8 +- ...bjectLiteralParameterResolution.errors.txt | 12 +- ...alReferencingInternalProperties.errors.txt | 2 +- ...alWithGetAccessorInsideFunction.errors.txt | 2 +- ...tLiteralWithNumericPropertyName.errors.txt | 6 +- ...peHidingMembersOfExtendedObject.errors.txt | 16 +- ...MembersOfObjectAssignmentCompat.errors.txt | 24 +- ...embersOfObjectAssignmentCompat2.errors.txt | 40 +- .../objectTypeLiteralSyntax2.errors.txt | 4 +- ...mbersOfFunctionAssignmentCompat.errors.txt | 4 +- ...ignatureAppearsToBeFunctionType.errors.txt | 4 +- ...mbersOfFunctionAssignmentCompat.errors.txt | 4 +- ...ypeWithDuplicateNumericProperty.errors.txt | 24 +- ...ypeWithRecursiveWrappedProperty.errors.txt | 4 +- ...peWithRecursiveWrappedProperty2.errors.txt | 4 +- ...WrappedPropertyCheckedNominally.errors.txt | 26 +- ...tringIndexerHidingObjectIndexer.errors.txt | 14 +- ...ypesIdentityWithCallSignatures3.errors.txt | 4 +- ...sIdentityWithComplexConstraints.errors.txt | 2 +- ...gnaturesDifferingByConstraints2.errors.txt | 16 +- ...gnaturesDifferingByConstraints3.errors.txt | 16 +- ...gnaturesDifferingByConstraints2.errors.txt | 14 +- ...gnaturesDifferingByConstraints3.errors.txt | 14 +- ...jectTypesWithOptionalProperties.errors.txt | 8 +- ...ectTypesWithOptionalProperties2.errors.txt | 30 +- ...tTypesWithPredefinedTypesAsName.errors.txt | 8 +- ...TypesWithPredefinedTypesAsName2.errors.txt | 2 +- .../octalLiteralInStrictModeES3.errors.txt | 2 +- .../operatorAddNullUndefined.errors.txt | 8 +- .../optionalArgsWithDefaultValues.errors.txt | 10 +- ...ptionalFunctionArgAssignability.errors.txt | 10 +- .../optionalParamArgsTest.errors.txt | 44 +- .../optionalParamAssignmentCompat.errors.txt | 6 +- ...nalParamReferencingOtherParams2.errors.txt | 2 +- ...nalParamReferencingOtherParams3.errors.txt | 2 +- .../optionalParamTypeComparison.errors.txt | 12 +- .../optionalPropertiesInClasses.errors.txt | 4 +- .../optionalPropertiesSyntax.errors.txt | 28 +- .../optionalPropertiesTest.errors.txt | 16 +- .../reference/optionalSetterParam.errors.txt | 2 +- ...attersForSignatureGroupIdentity.errors.txt | 2 +- ...erEagerReturnTypeSpecialization.errors.txt | 4 +- .../baselines/reference/overload1.errors.txt | 12 +- .../overloadAssignmentCompat.errors.txt | 2 +- .../overloadModifiersMustAgree.errors.txt | 8 +- ...overloadOnConstAsTypeAnnotation.errors.txt | 6 +- ...verloadOnConstConstraintChecks4.errors.txt | 2 +- ...rloadOnConstDuplicateOverloads1.errors.txt | 4 +- ...eWithBadImplementationInDerived.errors.txt | 4 +- .../overloadOnConstInCallback1.errors.txt | 2 +- ...tLiteralImplementingAnInterface.errors.txt | 4 +- .../overloadOnConstInheritance2.errors.txt | 8 +- .../overloadOnConstInheritance3.errors.txt | 10 +- .../overloadOnConstInheritance4.errors.txt | 6 +- ...rloadOnConstNoAnyImplementation.errors.txt | 8 +- ...loadOnConstNoAnyImplementation2.errors.txt | 10 +- ...nConstNoNonSpecializedSignature.errors.txt | 2 +- ...adOnConstNoStringImplementation.errors.txt | 6 +- ...dOnConstNoStringImplementation2.errors.txt | 8 +- ...loadOnConstantsInvalidOverload1.errors.txt | 6 +- .../reference/overloadResolution.errors.txt | 34 +- ...loadResolutionClassConstructors.errors.txt | 36 +- .../overloadResolutionConstructors.errors.txt | 34 +- ...ResolutionOnDefaultConstructor1.errors.txt | 2 +- .../overloadResolutionOverCTLambda.errors.txt | 2 +- .../overloadResolutionTest1.errors.txt | 20 +- .../overloadingOnConstants1.errors.txt | 16 +- .../overloadingOnConstants2.errors.txt | 8 +- ...dingOnConstantsInImplementation.errors.txt | 6 +- ...adingStaticFunctionsInFunctions.errors.txt | 28 +- ...nWithConstraintCheckingDeferred.errors.txt | 12 +- ...loadsAndTypeArgumentArityErrors.errors.txt | 6 +- ...rentContainersDisagreeOnAmbient.errors.txt | 2 +- .../overloadsWithProvisionalErrors.errors.txt | 8 +- .../overloadsWithinClasses.errors.txt | 2 +- .../overridingPrivateStaticMembers.errors.txt | 4 +- .../paramPropertiesInSignatures.errors.txt | 10 +- ...parameterPropertyInConstructor1.errors.txt | 2 +- ...parameterPropertyInConstructor2.errors.txt | 6 +- ...meterPropertyOutsideConstructor.errors.txt | 2 +- tests/baselines/reference/parse1.errors.txt | 2 +- tests/baselines/reference/parse2.errors.txt | 2 +- .../baselines/reference/parseTypes.errors.txt | 10 +- .../reference/parser0_004152.errors.txt | 68 +- .../reference/parser10.1.1-8gs.errors.txt | 8 +- .../reference/parser15.4.4.14-9-2.errors.txt | 2 +- .../reference/parser509534.errors.txt | 4 +- .../reference/parser509546.errors.txt | 2 +- .../reference/parser509546_1.errors.txt | 2 +- .../reference/parser509546_2.errors.txt | 2 +- .../reference/parser509618.errors.txt | 2 +- .../reference/parser509630.errors.txt | 2 +- .../reference/parser509667.errors.txt | 2 +- .../reference/parser509668.errors.txt | 2 +- .../reference/parser509669.errors.txt | 2 +- .../reference/parser509693.errors.txt | 4 +- .../reference/parser509698.errors.txt | 16 +- .../reference/parser512084.errors.txt | 2 +- .../reference/parser512097.errors.txt | 4 +- .../reference/parser512325.errors.txt | 14 +- .../reference/parser519458.errors.txt | 4 +- .../reference/parser521128.errors.txt | 4 +- .../reference/parser536727.errors.txt | 4 +- .../reference/parser553699.errors.txt | 2 +- .../reference/parser566700.errors.txt | 2 +- .../reference/parser585151.errors.txt | 4 +- .../reference/parser618973.errors.txt | 4 +- .../reference/parser642331_1.errors.txt | 2 +- .../reference/parser645086_1.errors.txt | 6 +- .../reference/parser645086_2.errors.txt | 6 +- ...parserAccessibilityAfterStatic1.errors.txt | 2 +- ...arserAccessibilityAfterStatic10.errors.txt | 2 +- ...parserAccessibilityAfterStatic6.errors.txt | 2 +- ...parserAccessibilityAfterStatic7.errors.txt | 2 +- .../reference/parserAccessors1.errors.txt | 2 +- .../reference/parserAccessors10.errors.txt | 6 +- .../reference/parserAccessors3.errors.txt | 2 +- .../reference/parserAccessors5.errors.txt | 2 +- .../reference/parserAccessors6.errors.txt | 2 +- .../reference/parserAccessors7.errors.txt | 4 +- .../reference/parserAccessors8.errors.txt | 2 +- .../reference/parserAccessors9.errors.txt | 2 +- .../parserAdditiveExpression1.errors.txt | 4 +- .../reference/parserAmbiguity1.errors.txt | 4 +- .../reference/parserAmbiguity2.errors.txt | 8 +- .../reference/parserAmbiguity3.errors.txt | 8 +- .../reference/parserArgumentList1.errors.txt | 6 +- .../parserArrowFunctionExpression1.errors.txt | 2 +- .../parserArrowFunctionExpression2.errors.txt | 6 +- .../parserArrowFunctionExpression3.errors.txt | 8 +- .../parserArrowFunctionExpression4.errors.txt | 4 +- .../parserAssignmentExpression1.errors.txt | 6 +- .../reference/parserAstSpans1.errors.txt | 16 +- ...serAutomaticSemicolonInsertion1.errors.txt | 4 +- .../parserBlockStatement1.d.errors.txt | 2 +- .../parserBreakStatement1.d.errors.txt | 2 +- .../parserCastVersusArrowFunction1.errors.txt | 26 +- ...rCatchClauseWithTypeAnnotation1.errors.txt | 2 +- .../reference/parserClass1.errors.txt | 4 +- .../reference/parserClass2.errors.txt | 8 +- .../parserClassDeclaration1.errors.txt | 8 +- .../parserClassDeclaration10.errors.txt | 4 +- .../parserClassDeclaration11.errors.txt | 2 +- .../parserClassDeclaration12.errors.txt | 2 +- .../parserClassDeclaration13.errors.txt | 2 +- .../parserClassDeclaration14.errors.txt | 4 +- .../parserClassDeclaration15.errors.txt | 2 +- .../parserClassDeclaration18.errors.txt | 2 +- .../parserClassDeclaration2.errors.txt | 12 +- .../parserClassDeclaration21.errors.txt | 2 +- .../parserClassDeclaration22.errors.txt | 2 +- .../parserClassDeclaration24.errors.txt | 2 +- .../parserClassDeclaration25.errors.txt | 4 +- .../parserClassDeclaration3.errors.txt | 8 +- .../parserClassDeclaration4.errors.txt | 8 +- .../parserClassDeclaration5.errors.txt | 12 +- .../parserClassDeclaration6.errors.txt | 8 +- .../parserClassDeclaration7.errors.txt | 2 +- .../parserClassDeclaration8.errors.txt | 2 +- .../parserClassDeclaration9.errors.txt | 2 +- .../parserCommaInTypeMemberList1.errors.txt | 2 +- .../parserCommaInTypeMemberList2.errors.txt | 16 +- .../parserConditionalExpression1.errors.txt | 14 +- .../parserConstructorAmbiguity1.errors.txt | 2 +- .../parserConstructorAmbiguity2.errors.txt | 2 +- .../parserConstructorAmbiguity3.errors.txt | 4 +- .../parserConstructorAmbiguity4.errors.txt | 6 +- .../parserConstructorDeclaration10.errors.txt | 2 +- .../parserConstructorDeclaration11.errors.txt | 4 +- .../parserConstructorDeclaration2.errors.txt | 2 +- .../parserConstructorDeclaration3.errors.txt | 2 +- .../parserConstructorDeclaration4.errors.txt | 2 +- .../parserConstructorDeclaration5.errors.txt | 2 +- .../parserConstructorDeclaration6.errors.txt | 2 +- .../parserConstructorDeclaration7.errors.txt | 4 +- .../parserConstructorDeclaration8.errors.txt | 4 +- .../parserConstructorDeclaration9.errors.txt | 2 +- .../parserContinueStatement1.d.errors.txt | 2 +- .../parserDebuggerStatement1.d.errors.txt | 2 +- .../reference/parserDoStatement1.d.errors.txt | 4 +- .../reference/parserES3Accessors1.errors.txt | 4 +- .../reference/parserES3Accessors2.errors.txt | 2 +- .../reference/parserES3Accessors3.errors.txt | 4 +- .../reference/parserES3Accessors4.errors.txt | 2 +- ...erEmptyParenthesizedExpression1.errors.txt | 2 +- .../parserEmptyStatement1.d.errors.txt | 2 +- .../reference/parserEnum1.errors.txt | 2 +- .../reference/parserEnum2.errors.txt | 2 +- .../reference/parserEnum3.errors.txt | 2 +- .../reference/parserEnum4.errors.txt | 4 +- .../reference/parserEnum5.errors.txt | 6 +- .../parserEnumDeclaration2.errors.txt | 2 +- .../parserEnumDeclaration3.d.errors.txt | 2 +- .../parserEnumDeclaration4.errors.txt | 2 +- .../parserEnumDeclaration6.errors.txt | 2 +- ...EqualsGreaterThanAfterFunction1.errors.txt | 4 +- ...EqualsGreaterThanAfterFunction2.errors.txt | 10 +- ...tAccessibilityModifierInModule1.errors.txt | 6 +- ...EqualsGreaterThanAfterFunction1.errors.txt | 4 +- ...EqualsGreaterThanAfterFunction2.errors.txt | 8 +- .../parserErrantSemicolonInClass1.errors.txt | 10 +- ...RecoveryArrayLiteralExpression1.errors.txt | 2 +- ...RecoveryArrayLiteralExpression2.errors.txt | 2 +- ...RecoveryArrayLiteralExpression3.errors.txt | 4 +- ...parserErrorRecoveryIfStatement1.errors.txt | 2 +- ...parserErrorRecoveryIfStatement2.errors.txt | 4 +- ...parserErrorRecoveryIfStatement3.errors.txt | 4 +- ...parserErrorRecoveryIfStatement4.errors.txt | 4 +- ...parserErrorRecoveryIfStatement5.errors.txt | 12 +- ...parserErrorRecoveryIfStatement6.errors.txt | 4 +- ...rserErrorRecovery_ArgumentList1.errors.txt | 6 +- ...rserErrorRecovery_ArgumentList2.errors.txt | 4 +- ...rserErrorRecovery_ArgumentList3.errors.txt | 6 +- ...rserErrorRecovery_ArgumentList4.errors.txt | 8 +- ...rserErrorRecovery_ArgumentList5.errors.txt | 6 +- ...rserErrorRecovery_ArgumentList6.errors.txt | 6 +- ...rserErrorRecovery_ArgumentList7.errors.txt | 8 +- .../parserErrorRecovery_Block1.errors.txt | 2 +- .../parserErrorRecovery_Block2.errors.txt | 2 +- .../parserErrorRecovery_Block3.errors.txt | 6 +- ...rserErrorRecovery_ClassElement1.errors.txt | 2 +- ...rserErrorRecovery_ClassElement2.errors.txt | 2 +- ...rserErrorRecovery_ClassElement3.errors.txt | 6 +- ...parserErrorRecovery_Expression1.errors.txt | 2 +- ...very_ExtendsOrImplementsClause1.errors.txt | 2 +- ...very_ExtendsOrImplementsClause2.errors.txt | 4 +- ...very_ExtendsOrImplementsClause3.errors.txt | 8 +- ...very_ExtendsOrImplementsClause4.errors.txt | 4 +- ...very_ExtendsOrImplementsClause5.errors.txt | 10 +- ...very_ExtendsOrImplementsClause6.errors.txt | 2 +- ...overy_IncompleteMemberVariable1.errors.txt | 2 +- ...overy_IncompleteMemberVariable2.errors.txt | 4 +- .../parserErrorRecovery_LeftShift1.errors.txt | 6 +- ...serErrorRecovery_ModuleElement1.errors.txt | 8 +- ...serErrorRecovery_ModuleElement2.errors.txt | 6 +- ...serErrorRecovery_ObjectLiteral1.errors.txt | 2 +- ...serErrorRecovery_ObjectLiteral2.errors.txt | 4 +- ...serErrorRecovery_ObjectLiteral3.errors.txt | 4 +- ...serErrorRecovery_ObjectLiteral4.errors.txt | 4 +- ...serErrorRecovery_ObjectLiteral5.errors.txt | 2 +- ...serErrorRecovery_ParameterList1.errors.txt | 2 +- ...serErrorRecovery_ParameterList2.errors.txt | 4 +- ...serErrorRecovery_ParameterList3.errors.txt | 2 +- ...serErrorRecovery_ParameterList4.errors.txt | 2 +- ...serErrorRecovery_ParameterList5.errors.txt | 4 +- ...serErrorRecovery_ParameterList6.errors.txt | 8 +- ...parserErrorRecovery_SourceUnit1.errors.txt | 2 +- ...rErrorRecovery_SwitchStatement1.errors.txt | 6 +- ...rErrorRecovery_SwitchStatement2.errors.txt | 4 +- ...rserErrorRecovery_VariableList1.errors.txt | 4 +- .../parserExportAssignment1.errors.txt | 4 +- .../parserExportAssignment2.errors.txt | 4 +- .../parserExportAssignment3.errors.txt | 4 +- .../parserExportAssignment4.errors.txt | 4 +- .../parserExportAssignment5.errors.txt | 4 +- .../parserExportAssignment6.errors.txt | 2 +- .../parserExportAssignment7.errors.txt | 6 +- .../parserExportAssignment8.errors.txt | 6 +- .../parserExpressionStatement1.d.errors.txt | 4 +- .../parserForInStatement1.d.errors.txt | 4 +- .../parserForInStatement2.errors.txt | 4 +- .../parserForInStatement3.errors.txt | 4 +- .../parserForInStatement4.errors.txt | 2 +- .../parserForInStatement5.errors.txt | 4 +- .../parserForInStatement6.errors.txt | 4 +- .../parserForInStatement7.errors.txt | 6 +- .../parserForStatement1.d.errors.txt | 2 +- .../reference/parserForStatement2.errors.txt | 2 +- .../reference/parserForStatement3.errors.txt | 14 +- .../reference/parserForStatement4.errors.txt | 6 +- .../reference/parserForStatement5.errors.txt | 4 +- .../reference/parserForStatement6.errors.txt | 6 +- .../reference/parserForStatement7.errors.txt | 6 +- .../reference/parserForStatement8.errors.txt | 4 +- .../parserFunctionDeclaration1.errors.txt | 2 +- .../parserFunctionDeclaration2.d.errors.txt | 4 +- .../parserFunctionDeclaration2.errors.txt | 2 +- .../parserFunctionDeclaration3.errors.txt | 2 +- .../parserFunctionDeclaration4.errors.txt | 2 +- .../parserFunctionDeclaration6.errors.txt | 2 +- .../parserFunctionDeclaration7.errors.txt | 2 +- .../reference/parserFuzz1.errors.txt | 12 +- .../parserGenericConstraint2.errors.txt | 4 +- .../parserGenericConstraint3.errors.txt | 4 +- .../parserGenericConstraint4.errors.txt | 4 +- .../parserGenericConstraint5.errors.txt | 4 +- .../parserGenericConstraint6.errors.txt | 4 +- .../parserGenericConstraint7.errors.txt | 4 +- ...GenericsInInterfaceDeclaration1.errors.txt | 2 +- .../parserGenericsInTypeContexts1.errors.txt | 20 +- .../parserGenericsInTypeContexts2.errors.txt | 20 +- ...rGenericsInVariableDeclaration1.errors.txt | 12 +- ...rGetAccessorWithTypeParameters1.errors.txt | 4 +- ...rserGreaterThanTokenAmbiguity11.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity12.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity13.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity14.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity15.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity16.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity17.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity18.errors.txt | 2 +- ...rserGreaterThanTokenAmbiguity19.errors.txt | 2 +- ...arserGreaterThanTokenAmbiguity2.errors.txt | 4 +- ...rserGreaterThanTokenAmbiguity20.errors.txt | 2 +- ...arserGreaterThanTokenAmbiguity3.errors.txt | 4 +- ...arserGreaterThanTokenAmbiguity4.errors.txt | 4 +- ...arserGreaterThanTokenAmbiguity7.errors.txt | 2 +- ...arserGreaterThanTokenAmbiguity8.errors.txt | 2 +- ...arserGreaterThanTokenAmbiguity9.errors.txt | 2 +- .../reference/parserIfStatement1.d.errors.txt | 4 +- .../reference/parserIfStatement2.errors.txt | 2 +- .../parserImportDeclaration1.errors.txt | 2 +- .../reference/parserInExpression1.errors.txt | 2 +- .../parserIndexMemberDeclaration10.errors.txt | 4 +- .../parserIndexMemberDeclaration5.errors.txt | 2 +- .../parserIndexMemberDeclaration6.errors.txt | 2 +- .../parserIndexMemberDeclaration7.errors.txt | 2 +- .../parserIndexMemberDeclaration8.errors.txt | 2 +- .../parserIndexMemberDeclaration9.errors.txt | 2 +- .../parserIndexSignature1.errors.txt | 2 +- .../parserIndexSignature10.errors.txt | 2 +- .../parserIndexSignature11.errors.txt | 6 +- .../parserIndexSignature2.errors.txt | 4 +- .../parserIndexSignature3.errors.txt | 2 +- .../parserIndexSignature4.errors.txt | 4 +- .../parserIndexSignature5.errors.txt | 2 +- .../parserIndexSignature6.errors.txt | 2 +- .../parserIndexSignature7.errors.txt | 2 +- .../parserIndexSignature8.errors.txt | 4 +- .../parserIndexSignature9.errors.txt | 2 +- .../parserInterfaceDeclaration1.errors.txt | 8 +- .../parserInterfaceDeclaration2.errors.txt | 10 +- .../parserInterfaceDeclaration3.errors.txt | 2 +- .../parserInterfaceDeclaration4.errors.txt | 2 +- .../parserInterfaceDeclaration5.errors.txt | 2 +- .../parserInterfaceDeclaration6.errors.txt | 4 +- .../parserInterfaceDeclaration7.errors.txt | 2 +- .../parserInterfaceDeclaration8.errors.txt | 2 +- ...dentifiersInVariableStatements1.errors.txt | 4 +- ...sOffOfObjectCreationExpression1.errors.txt | 2 +- ...parserKeywordsAsIdentifierName2.errors.txt | 4 +- .../parserLabeledStatement1.d.errors.txt | 4 +- ...erAccessAfterPostfixExpression1.errors.txt | 6 +- .../parserMemberAccessExpression1.errors.txt | 16 +- ...erMemberAccessOffOfGenericType1.errors.txt | 6 +- .../parserMemberAccessor1.errors.txt | 2 +- ...arserMemberAccessorDeclaration1.errors.txt | 2 +- ...rserMemberAccessorDeclaration10.errors.txt | 4 +- ...rserMemberAccessorDeclaration11.errors.txt | 2 +- ...rserMemberAccessorDeclaration12.errors.txt | 4 +- ...rserMemberAccessorDeclaration13.errors.txt | 2 +- ...rserMemberAccessorDeclaration14.errors.txt | 2 +- ...rserMemberAccessorDeclaration15.errors.txt | 4 +- ...rserMemberAccessorDeclaration16.errors.txt | 2 +- ...rserMemberAccessorDeclaration17.errors.txt | 2 +- ...rserMemberAccessorDeclaration18.errors.txt | 2 +- ...arserMemberAccessorDeclaration2.errors.txt | 2 +- ...arserMemberAccessorDeclaration3.errors.txt | 2 +- ...arserMemberAccessorDeclaration7.errors.txt | 4 +- ...arserMemberAccessorDeclaration8.errors.txt | 4 +- ...arserMemberAccessorDeclaration9.errors.txt | 4 +- ...arserMemberFunctionDeclaration1.errors.txt | 2 +- ...arserMemberFunctionDeclaration2.errors.txt | 2 +- ...arserMemberFunctionDeclaration3.errors.txt | 2 +- ...arserMemberFunctionDeclaration4.errors.txt | 2 +- ...arserMemberFunctionDeclaration5.errors.txt | 2 +- ...FunctionDeclarationAmbiguities1.errors.txt | 8 +- ...arserMemberVariableDeclaration1.errors.txt | 2 +- ...arserMemberVariableDeclaration2.errors.txt | 2 +- ...arserMemberVariableDeclaration3.errors.txt | 2 +- ...arserMemberVariableDeclaration4.errors.txt | 2 +- ...arserMemberVariableDeclaration5.errors.txt | 2 +- .../parserMissingLambdaOpenBrace1.errors.txt | 10 +- .../reference/parserMissingToken1.errors.txt | 6 +- .../reference/parserMissingToken2.errors.txt | 4 +- ...serModifierOnPropertySignature1.errors.txt | 2 +- ...rserModifierOnStatementInBlock1.errors.txt | 6 +- ...rserModifierOnStatementInBlock2.errors.txt | 4 +- ...rserModifierOnStatementInBlock3.errors.txt | 6 +- ...rserModifierOnStatementInBlock4.errors.txt | 6 +- .../reference/parserModule1.errors.txt | 2 +- .../parserModuleDeclaration1.d.errors.txt | 2 +- .../parserModuleDeclaration1.errors.txt | 2 +- .../parserModuleDeclaration10.errors.txt | 4 +- .../parserModuleDeclaration2.d.errors.txt | 2 +- .../parserModuleDeclaration3.errors.txt | 2 +- .../parserModuleDeclaration4.d.errors.txt | 4 +- .../parserModuleDeclaration5.errors.txt | 2 +- ...IOnCallAfterFunctionExpression1.errors.txt | 4 +- .../reference/parserNotHexLiteral1.errors.txt | 4 +- .../reference/parserNotRegex1.errors.txt | 4 +- .../parserObjectCreation1.errors.txt | 4 +- .../parserObjectCreation2.errors.txt | 2 +- ...rserObjectCreationArrayLiteral1.errors.txt | 4 +- ...rserObjectCreationArrayLiteral2.errors.txt | 2 +- ...rserObjectCreationArrayLiteral3.errors.txt | 4 +- ...rserObjectCreationArrayLiteral4.errors.txt | 2 +- .../reference/parserObjectType5.errors.txt | 4 +- .../reference/parserObjectType6.errors.txt | 4 +- .../parserOptionalTypeMembers1.errors.txt | 8 +- .../parserOverloadOnConstants1.errors.txt | 8 +- .../reference/parserParameterList1.errors.txt | 2 +- .../parserParameterList10.errors.txt | 4 +- .../parserParameterList11.errors.txt | 2 +- .../parserParameterList12.errors.txt | 2 +- .../parserParameterList13.errors.txt | 2 +- .../parserParameterList14.errors.txt | 2 +- .../parserParameterList15.errors.txt | 4 +- .../parserParameterList16.errors.txt | 4 +- .../parserParameterList17.errors.txt | 4 +- .../reference/parserParameterList2.errors.txt | 2 +- .../reference/parserParameterList3.errors.txt | 2 +- .../reference/parserParameterList4.errors.txt | 2 +- .../reference/parserParameterList5.errors.txt | 6 +- .../reference/parserParameterList6.errors.txt | 2 +- .../reference/parserParameterList7.errors.txt | 4 +- .../reference/parserParameterList8.errors.txt | 6 +- .../reference/parserParameterList9.errors.txt | 2 +- ...parserPostfixPostfixExpression1.errors.txt | 8 +- .../parserPostfixUnaryExpression1.errors.txt | 8 +- .../reference/parserPublicBreak1.errors.txt | 4 +- .../reference/parserRealSource1.errors.txt | 2 +- .../reference/parserRealSource10.errors.txt | 684 +++++----- .../reference/parserRealSource11.errors.txt | 1030 +++++++-------- .../reference/parserRealSource12.errors.txt | 418 +++--- .../reference/parserRealSource13.errors.txt | 232 ++-- .../reference/parserRealSource14.errors.txt | 320 ++--- .../reference/parserRealSource2.errors.txt | 2 +- .../reference/parserRealSource3.errors.txt | 2 +- .../reference/parserRealSource4.errors.txt | 4 +- .../reference/parserRealSource5.errors.txt | 20 +- .../reference/parserRealSource6.errors.txt | 122 +- .../reference/parserRealSource7.errors.txt | 606 ++++----- .../reference/parserRealSource8.errors.txt | 268 ++-- .../reference/parserRealSource9.errors.txt | 66 +- .../parserRegularExpression1.errors.txt | 2 +- .../parserRegularExpression2.errors.txt | 2 +- .../parserRegularExpression3.errors.txt | 2 +- .../parserRegularExpression4.errors.txt | 34 +- .../parserRegularExpression5.errors.txt | 4 +- ...gularExpressionDivideAmbiguity1.errors.txt | 4 +- ...gularExpressionDivideAmbiguity2.errors.txt | 4 +- ...gularExpressionDivideAmbiguity3.errors.txt | 2 +- ...gularExpressionDivideAmbiguity4.errors.txt | 6 +- ...gularExpressionDivideAmbiguity5.errors.txt | 6 +- .../parserReturnStatement1.d.errors.txt | 2 +- .../parserReturnStatement1.errors.txt | 2 +- .../parserReturnStatement2.errors.txt | 2 +- .../parserReturnStatement4.errors.txt | 2 +- .../reference/parserS12.11_A3_T4.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 | 66 +- .../reference/parserS7.9_A5.7_T1.errors.txt | 2 +- ...rSetAccessorWithTypeAnnotation1.errors.txt | 2 +- ...rSetAccessorWithTypeParameters1.errors.txt | 2 +- .../reference/parserSkippedTokens1.errors.txt | 2 +- .../parserSkippedTokens10.errors.txt | 4 +- .../parserSkippedTokens11.errors.txt | 6 +- .../parserSkippedTokens12.errors.txt | 6 +- .../parserSkippedTokens13.errors.txt | 2 +- .../parserSkippedTokens14.errors.txt | 4 +- .../parserSkippedTokens15.errors.txt | 4 +- .../parserSkippedTokens16.errors.txt | 18 +- .../parserSkippedTokens17.errors.txt | 8 +- .../parserSkippedTokens18.errors.txt | 8 +- .../parserSkippedTokens19.errors.txt | 2 +- .../reference/parserSkippedTokens2.errors.txt | 4 +- .../parserSkippedTokens20.errors.txt | 6 +- .../reference/parserSkippedTokens3.errors.txt | 4 +- .../reference/parserSkippedTokens4.errors.txt | 2 +- .../reference/parserSkippedTokens5.errors.txt | 2 +- .../reference/parserSkippedTokens6.errors.txt | 2 +- .../reference/parserSkippedTokens7.errors.txt | 2 +- .../reference/parserSkippedTokens8.errors.txt | 2 +- .../reference/parserSkippedTokens9.errors.txt | 2 +- ...sNotAMemberVariableDeclaration1.errors.txt | 4 +- .../reference/parserStrictMode1.errors.txt | 8 +- .../reference/parserStrictMode10.errors.txt | 2 +- .../reference/parserStrictMode11.errors.txt | 2 +- .../reference/parserStrictMode12.errors.txt | 2 +- .../reference/parserStrictMode13.errors.txt | 2 +- .../reference/parserStrictMode14.errors.txt | 6 +- .../parserStrictMode15-negative.errors.txt | 4 +- .../reference/parserStrictMode15.errors.txt | 2 +- .../reference/parserStrictMode2.errors.txt | 10 +- .../parserStrictMode3-negative.errors.txt | 2 +- .../reference/parserStrictMode3.errors.txt | 4 +- .../reference/parserStrictMode4.errors.txt | 4 +- .../reference/parserStrictMode5.errors.txt | 4 +- .../parserStrictMode6-negative.errors.txt | 2 +- .../reference/parserStrictMode6.errors.txt | 4 +- .../reference/parserStrictMode7.errors.txt | 2 +- .../reference/parserStrictMode8.errors.txt | 4 +- .../reference/parserStrictMode9.errors.txt | 2 +- .../parserSuperExpression1.errors.txt | 4 +- .../parserSuperExpression2.errors.txt | 4 +- .../parserSuperExpression3.errors.txt | 2 +- .../parserSuperExpression4.errors.txt | 4 +- .../parserSwitchStatement1.d.errors.txt | 4 +- ...parserTernaryAndCommaOperators1.errors.txt | 6 +- .../parserThrowStatement1.d.errors.txt | 4 +- .../parserTryStatement1.d.errors.txt | 2 +- ...tionInObjectCreationExpression1.errors.txt | 6 +- .../reference/parserTypeQuery1.errors.txt | 2 +- .../reference/parserTypeQuery2.errors.txt | 2 +- .../reference/parserTypeQuery3.errors.txt | 4 +- .../reference/parserTypeQuery4.errors.txt | 4 +- .../reference/parserTypeQuery5.errors.txt | 2 +- .../reference/parserTypeQuery6.errors.txt | 2 +- .../reference/parserTypeQuery7.errors.txt | 2 +- .../reference/parserTypeQuery8.errors.txt | 8 +- .../reference/parserTypeQuery9.errors.txt | 2 +- .../parserUnaryExpression1.errors.txt | 2 +- .../parserUnaryExpression2.errors.txt | 2 +- .../parserUnaryExpression3.errors.txt | 2 +- .../parserUnaryExpression4.errors.txt | 2 +- .../parserUnaryExpression5.errors.txt | 4 +- .../parserUnaryExpression7.errors.txt | 4 +- ...nfinishedTypeNameBeforeKeyword1.errors.txt | 8 +- .../reference/parserUnicode1.errors.txt | 4 +- .../parserUnterminatedGeneric1.errors.txt | 6 +- .../parserUnterminatedGeneric2.errors.txt | 30 +- ...serUsingConstructorAsIdentifier.errors.txt | 14 +- .../parserVariableDeclaration1.errors.txt | 8 +- .../parserVariableDeclaration10.errors.txt | 2 +- .../parserVariableDeclaration2.errors.txt | 4 +- .../parserVariableDeclaration3.errors.txt | 8 +- .../parserVariableDeclaration4.errors.txt | 2 +- .../parserVariableDeclaration5.errors.txt | 2 +- .../parserVariableDeclaration6.errors.txt | 2 +- .../parserVariableDeclaration8.errors.txt | 2 +- .../parserVariableStatement1.d.errors.txt | 4 +- .../parserVariableStatement2.d.errors.txt | 2 +- .../parserWhileStatement1.d.errors.txt | 4 +- .../parserWithStatement1.d.errors.txt | 6 +- .../reference/parserWithStatement2.errors.txt | 4 +- .../parserX_ArrowFunction1.errors.txt | 2 +- .../parserX_ArrowFunction2.errors.txt | 4 +- .../parserX_ArrowFunction3.errors.txt | 6 +- .../parserX_TypeArgumentList1.errors.txt | 10 +- ...akInIterationOrSwitchStatement4.errors.txt | 2 +- ...otInIterationOrSwitchStatement1.errors.txt | 2 +- ...otInIterationOrSwitchStatement2.errors.txt | 2 +- .../reference/parser_breakTarget5.errors.txt | 2 +- .../reference/parser_breakTarget6.errors.txt | 2 +- ...r_continueInIterationStatement4.errors.txt | 2 +- ...ontinueNotInIterationStatement1.errors.txt | 2 +- ...ontinueNotInIterationStatement2.errors.txt | 2 +- ...ontinueNotInIterationStatement3.errors.txt | 2 +- ...ontinueNotInIterationStatement4.errors.txt | 2 +- .../parser_continueTarget1.errors.txt | 2 +- .../parser_continueTarget5.errors.txt | 2 +- .../parser_continueTarget6.errors.txt | 2 +- .../parser_duplicateLabel1.errors.txt | 2 +- .../parser_duplicateLabel2.errors.txt | 2 +- .../reference/parserharness.errors.txt | 222 ++-- .../reference/parserindenter.errors.txt | 256 ++-- .../parservoidInQualifiedName1.errors.txt | 4 +- .../parservoidInQualifiedName2.errors.txt | 6 +- ...sWhenHittingUnexpectedSemicolon.errors.txt | 2 +- .../plusOperatorInvalidOperations.errors.txt | 4 +- .../plusOperatorWithAnyOtherType.errors.txt | 6 +- .../primaryExpressionMods.errors.txt | 4 +- .../primitiveConstraints1.errors.txt | 4 +- .../primitiveConstraints2.errors.txt | 4 +- .../reference/primitiveMembers.errors.txt | 8 +- .../primitiveTypeAsClassName.errors.txt | 2 +- .../primitiveTypeAsInterfaceName.errors.txt | 2 +- ...itiveTypeAsInterfaceNameGeneric.errors.txt | 2 +- .../primitiveTypeAssignment.errors.txt | 6 +- .../privacyAccessorDeclFile.errors.txt | 72 +- ...ivacyCannotNameAccessorDeclFile.errors.txt | 16 +- ...rivacyCannotNameVarTypeDeclFile.errors.txt | 24 +- .../privacyCheckTypeOfFunction.errors.txt | 4 +- ...CheckTypeOfInvisibleModuleError.errors.txt | 2 +- ...eckTypeOfInvisibleModuleNoError.errors.txt | 2 +- ...ivacyClassExtendsClauseDeclFile.errors.txt | 10 +- ...cyClassImplementsClauseDeclFile.errors.txt | 12 +- ...CannotNameParameterTypeDeclFile.errors.txt | 48 +- ...ionCannotNameReturnTypeDeclFile.errors.txt | 24 +- ...rivacyFunctionParameterDeclFile.errors.txt | 120 +- ...ivacyFunctionReturnTypeDeclFile.errors.txt | 132 +- .../reference/privacyGloImport.errors.txt | 4 +- .../privacyGloImportParseErrors.errors.txt | 32 +- .../reference/privacyImport.errors.txt | 4 +- .../privacyImportParseErrors.errors.txt | 98 +- ...yInterfaceExtendsClauseDeclFile.errors.txt | 12 +- ...ternalReferenceImportWithExport.errors.txt | 14 +- ...nalReferenceImportWithoutExport.errors.txt | 10 +- ...ternalReferenceImportWithExport.errors.txt | 14 +- ...nalReferenceImportWithoutExport.errors.txt | 10 +- ...TypeParameterOfFunctionDeclFile.errors.txt | 72 +- ...cyTypeParametersOfClassDeclFile.errors.txt | 8 +- ...peParametersOfInterfaceDeclFile.errors.txt | 40 +- .../reference/privacyVarDeclFile.errors.txt | 60 +- .../privateAccessInSubclass1.errors.txt | 2 +- ...ssPropertyAccessibleWithinClass.errors.txt | 16 +- .../reference/privateIndexer.errors.txt | 6 +- .../reference/privateIndexer2.errors.txt | 28 +- ...vateInstanceMemberAccessibility.errors.txt | 12 +- .../privateInterfaceProperties.errors.txt | 4 +- ...rivateStaticMemberAccessibility.errors.txt | 4 +- ...ateStaticNotAccessibleInClodule.errors.txt | 2 +- ...teStaticNotAccessibleInClodule2.errors.txt | 2 +- .../reference/privateVisibility.errors.txt | 6 +- .../amd/cantFindTheModule.errors.txt | 6 +- .../node/cantFindTheModule.errors.txt | 6 +- .../amd/declareVariableCollision.errors.txt | 2 +- .../node/declareVariableCollision.errors.txt | 2 +- .../amd/intReferencingExtAndInt.errors.txt | 2 +- .../node/intReferencingExtAndInt.errors.txt | 2 +- ...SourceRootWithNoSourceMapOption.errors.txt | 4 +- ...SourceRootWithNoSourceMapOption.errors.txt | 4 +- .../mapRootWithNoSourceMapOption.errors.txt | 2 +- .../mapRootWithNoSourceMapOption.errors.txt | 2 +- .../nestedLocalModuleSimpleCase.errors.txt | 2 +- .../nestedLocalModuleSimpleCase.errors.txt | 2 +- ...calModuleWithRecursiveTypecheck.errors.txt | 2 +- ...calModuleWithRecursiveTypecheck.errors.txt | 2 +- .../noDefaultLib/amd/noDefaultLib.errors.txt | 18 +- .../noDefaultLib/node/noDefaultLib.errors.txt | 18 +- ...dModuleDeclarationsInsideModule.errors.txt | 4 +- ...dModuleDeclarationsInsideModule.errors.txt | 4 +- ...arationsInsideNonExportedModule.errors.txt | 4 +- ...arationsInsideNonExportedModule.errors.txt | 4 +- ...leImportStatementInParentModule.errors.txt | 4 +- ...leImportStatementInParentModule.errors.txt | 4 +- ...sourceRootWithNoSourceMapOption.errors.txt | 2 +- ...sourceRootWithNoSourceMapOption.errors.txt | 2 +- ...ibilityOfTypeUsedAcrossModules2.errors.txt | 4 +- ...ibilityOfTypeUsedAcrossModules2.errors.txt | 4 +- .../reference/promiseChaining1.errors.txt | 2 +- .../reference/promiseChaining2.errors.txt | 2 +- .../reference/promiseIdentity2.errors.txt | 2 +- .../promiseIdentityWithAny2.errors.txt | 4 +- .../reference/promisePermutations.errors.txt | 50 +- .../reference/promisePermutations2.errors.txt | 56 +- .../reference/promisePermutations3.errors.txt | 56 +- .../propertiesAndIndexers.errors.txt | 38 +- .../reference/propertyAccess.errors.txt | 20 +- .../reference/propertyAccess1.errors.txt | 2 +- .../reference/propertyAccess2.errors.txt | 2 +- .../reference/propertyAccess3.errors.txt | 2 +- .../reference/propertyAccess4.errors.txt | 2 +- .../reference/propertyAccess5.errors.txt | 2 +- ...OnTypeParameterWithConstraints3.errors.txt | 12 +- ...OnTypeParameterWithConstraints4.errors.txt | 8 +- ...OnTypeParameterWithConstraints5.errors.txt | 12 +- .../propertyAccessibility1.errors.txt | 2 +- .../propertyAccessibility2.errors.txt | 2 +- ...propertyAndAccessorWithSameName.errors.txt | 16 +- ...propertyAndFunctionWithSameName.errors.txt | 4 +- .../reference/propertyAssignment.errors.txt | 6 +- ...ertyIdentityWithPrivacyMismatch.errors.txt | 4 +- .../propertyNamedPrototype.errors.txt | 2 +- .../reference/propertyOrdering.errors.txt | 8 +- .../reference/propertyOrdering2.errors.txt | 2 +- ...opertyParameterWithQuestionMark.errors.txt | 8 +- .../reference/propertySignatures.errors.txt | 4 +- .../reference/propertyWrappedInTry.errors.txt | 18 +- .../reference/protoAssignment.errors.txt | 2 +- .../baselines/reference/prototypes.errors.txt | 2 +- .../reference/publicIndexer.errors.txt | 6 +- ...lementedAsPrivateInDerivedClass.errors.txt | 4 +- .../qualifiedModuleLocals.errors.txt | 2 +- ...-does-not-affect-class-heritage.errors.txt | 2 +- tests/baselines/reference/qualify.errors.txt | 28 +- .../reference/quotedAccessorName1.errors.txt | 2 +- .../reference/quotedAccessorName2.errors.txt | 2 +- .../quotedModuleNameMustBeAmbient.errors.txt | 2 +- .../raiseErrorOnParameterProperty.errors.txt | 2 +- .../reference/reassignStaticProp.errors.txt | 2 +- .../reboundIdentifierOnImportAlias.errors.txt | 2 +- .../reference/recursiveBaseCheck.errors.txt | 2 +- .../reference/recursiveBaseCheck2.errors.txt | 2 +- .../reference/recursiveBaseCheck3.errors.txt | 4 +- .../reference/recursiveBaseCheck4.errors.txt | 4 +- .../reference/recursiveBaseCheck5.errors.txt | 4 +- .../reference/recursiveBaseCheck6.errors.txt | 4 +- ...cursiveBaseConstructorCreation3.errors.txt | 4 +- .../recursiveClassReferenceTest.errors.txt | 8 +- ...rtAssignmentAndFindAliasedType1.errors.txt | 2 +- ...rtAssignmentAndFindAliasedType2.errors.txt | 2 +- ...rtAssignmentAndFindAliasedType3.errors.txt | 2 +- ...rtAssignmentAndFindAliasedType4.errors.txt | 2 +- ...rtAssignmentAndFindAliasedType5.errors.txt | 2 +- ...rtAssignmentAndFindAliasedType6.errors.txt | 2 +- .../recursiveFunctionTypes.errors.txt | 28 +- .../recursiveGenericTypeHierarchy.errors.txt | 8 +- .../recursiveGetterAccess.errors.txt | 2 +- .../recursiveIdenticalAssignment.errors.txt | 2 +- .../recursiveInferenceBug.errors.txt | 2 +- .../reference/recursiveInheritance.errors.txt | 4 +- .../recursiveInheritance3.errors.txt | 4 +- .../recursiveInheritanceGeneric.errors.txt | 2 +- .../recursiveNamedLambdaCall.errors.txt | 10 +- ...rsiveSpecializationOfSignatures.errors.txt | 2 +- ...ecursiveTypeInGenericConstraint.errors.txt | 2 +- ...onstraintReferenceLacksTypeArgs.errors.txt | 2 +- .../reference/recursiveTypes1.errors.txt | 4 +- ...veTypesUsedAsFunctionParameters.errors.txt | 2 +- .../reference/redefineArray.errors.txt | 4 +- .../relativePathMustResolve.errors.txt | 2 +- .../relativePathToDeclarationFile.errors.txt | 2 +- .../requireOfAnEmptyFile1.errors.txt | 2 +- .../reservedNameOnInterfaceImport.errors.txt | 2 +- ...NameOnModuleImportWithInterface.errors.txt | 2 +- .../restArgAssignmentCompat.errors.txt | 8 +- .../reference/restArgMissingName.errors.txt | 2 +- .../reference/restParamAsOptional.errors.txt | 4 +- .../reference/restParameterNotLast.errors.txt | 2 +- ...eterWithoutAnnotationIsAnyArray.errors.txt | 6 +- .../restParametersOfNonArrayTypes.errors.txt | 34 +- .../restParametersOfNonArrayTypes2.errors.txt | 68 +- ...ametersWithArrayTypeAnnotations.errors.txt | 12 +- .../restParamsWithNonRestParams.errors.txt | 2 +- .../reference/returnInConstructor1.errors.txt | 8 +- .../reference/returnTypeParameter.errors.txt | 4 +- .../returnTypeTypeArguments.errors.txt | 74 +- .../reference/returnValueInSetter.errors.txt | 4 +- .../reference/scanner10.1.1-8gs.errors.txt | 8 +- .../scannerAdditiveExpression1.errors.txt | 4 +- .../reference/scannerClass2.errors.txt | 8 +- .../scannerES3NumericLiteral3.errors.txt | 2 +- .../scannerES3NumericLiteral4.errors.txt | 2 +- .../scannerES3NumericLiteral6.errors.txt | 2 +- .../reference/scannerEnum1.errors.txt | 2 +- .../scannerImportDeclaration1.errors.txt | 2 +- .../scannerNumericLiteral2.errors.txt | 2 +- .../scannerNumericLiteral3.errors.txt | 4 +- .../scannerNumericLiteral4.errors.txt | 2 +- .../scannerNumericLiteral6.errors.txt | 2 +- .../scannerNumericLiteral8.errors.txt | 2 +- .../scannerNumericLiteral9.errors.txt | 4 +- .../reference/scannerS7.2_A1.5_T2.errors.txt | 4 +- .../reference/scannerS7.3_A1.1_T2.errors.txt | 2 +- .../reference/scannerS7.4_A2_T2.errors.txt | 2 +- .../reference/scannerS7.6_A4.2_T1.errors.txt | 66 +- .../scannerS7.8.3_A6.1_T1.errors.txt | 2 +- .../scannerS7.8.4_A7.1_T4.errors.txt | 2 +- .../scannerStringLiterals.errors.txt | 4 +- ...scannerUnexpectedNullCharacter1.errors.txt | Bin 265 -> 321 bytes .../reference/scannertest1.errors.txt | 32 +- ...xtendedClassInsidePublicMethod2.errors.txt | 4 +- ...xtendedClassInsideStaticMethod1.errors.txt | 6 +- .../scopeCheckInsidePublicMethod1.errors.txt | 2 +- .../scopeCheckInsideStaticMethod1.errors.txt | 4 +- .../baselines/reference/scopeTests.errors.txt | 4 +- .../reference/scopingInCatchBlocks.errors.txt | 2 +- tests/baselines/reference/selfRef.errors.txt | 4 +- ...fReferencesInFunctionParameters.errors.txt | 8 +- .../semicolonsInModuleDeclarations.errors.txt | 2 +- .../reference/separate1-1.errors.txt | 2 +- .../reference/setterBeforeGetter.errors.txt | 4 +- .../reference/setterWithReturn.errors.txt | 6 +- .../reference/shadowPrivateMembers.errors.txt | 4 +- .../shadowedInternalModule.errors.txt | 4 +- ...slashBeforeVariableDeclaration1.errors.txt | 2 +- .../reference/sourceMapSample.errors.txt | 2 +- .../sourceMapValidationEnums.errors.txt | 2 +- .../sourceMapValidationFor.errors.txt | 4 +- .../sourceMapValidationForIn.errors.txt | 8 +- .../sourceMapValidationStatements.errors.txt | 2 +- ...lizedOverloadWithRestParameters.errors.txt | 4 +- ...edSignatureAsCallbackParameter1.errors.txt | 6 +- ...ubtypeOfNonSpecializedSignature.errors.txt | 24 +- ...eOverloadReturnTypeWithIndexers.errors.txt | 2 +- .../staticClassMemberError.errors.txt | 6 +- .../reference/staticClassProps.errors.txt | 4 +- .../reference/staticGetter1.errors.txt | 2 +- .../staticGetterAndSetter.errors.txt | 4 +- .../reference/staticIndexer.errors.txt | 2 +- .../reference/staticIndexers.errors.txt | 6 +- .../staticInstanceResolution4.errors.txt | 2 +- .../staticInstanceResolution5.errors.txt | 2 +- ...gnsToConstructorFunctionMembers.errors.txt | 4 +- .../staticMemberExportAccess.errors.txt | 6 +- ...cMemberOfAnotherClassAssignment.errors.txt | 16 +- ...cMembersUsingClassTypeParameter.errors.txt | 12 +- ...cMethodReferencingTypeArgument1.errors.txt | 6 +- ...sReferencingClassTypeParameters.errors.txt | 2 +- .../staticModifierAlreadySeen.errors.txt | 4 +- .../staticMustPrecedePublic.errors.txt | 4 +- .../reference/staticOffOfInstance1.errors.txt | 2 +- .../reference/staticOffOfInstance2.errors.txt | 2 +- .../reference/staticPropSuper.errors.txt | 6 +- .../staticPropertyNotInClassType.errors.txt | 22 +- .../staticPrototypeProperty.errors.txt | 4 +- .../reference/staticVisibility.errors.txt | 14 +- tests/baselines/reference/statics.errors.txt | 4 +- .../reference/staticsInAFunction.errors.txt | 28 +- .../staticsInConstructorBodies.errors.txt | 4 +- .../staticsNotInScopeInClodule.errors.txt | 2 +- .../strictModeInConstructor.errors.txt | 4 +- .../stringIndexerAndConstructor.errors.txt | 4 +- .../stringIndexerAndConstructor1.errors.txt | 2 +- .../stringIndexerAssignments1.errors.txt | 10 +- .../stringIndexerAssignments2.errors.txt | 10 +- ...rConstrainsPropertyDeclarations.errors.txt | 58 +- ...ConstrainsPropertyDeclarations2.errors.txt | 20 +- .../reference/stringLiteralType.errors.txt | 2 +- ...ingLiteralTypeIsSubtypeOfString.errors.txt | 26 +- ...TypesInImplementationSignatures.errors.txt | 22 +- ...ypesInImplementationSignatures2.errors.txt | 24 +- .../reference/stringLiteralsErrors.errors.txt | 34 +- .../stringNamedPropertyDuplicates.errors.txt | 12 +- .../stringPropertyAccessWithError.errors.txt | 2 +- .../subtypesOfTypeParameter.errors.txt | 80 +- ...sOfTypeParameterWithConstraints.errors.txt | 268 ++-- ...OfTypeParameterWithConstraints2.errors.txt | 58 +- ...OfTypeParameterWithConstraints3.errors.txt | 14 +- ...OfTypeParameterWithConstraints4.errors.txt | 58 +- ...rameterWithRecursiveConstraints.errors.txt | 222 ++-- .../subtypingWithCallSignaturesA.errors.txt | 2 +- ...ignaturesWithOptionalParameters.errors.txt | 12 +- ...allSignaturesWithRestParameters.errors.txt | 110 +- ...aturesWithSpecializedSignatures.errors.txt | 8 +- ...ignaturesWithOptionalParameters.errors.txt | 12 +- ...aturesWithSpecializedSignatures.errors.txt | 8 +- ...ignaturesWithOptionalParameters.errors.txt | 36 +- ...ignaturesWithOptionalParameters.errors.txt | 36 +- .../subtypingWithNumericIndexer.errors.txt | 12 +- .../subtypingWithNumericIndexer2.errors.txt | 30 +- .../subtypingWithNumericIndexer3.errors.txt | 30 +- .../subtypingWithNumericIndexer4.errors.txt | 26 +- .../subtypingWithNumericIndexer5.errors.txt | 26 +- .../subtypingWithObjectMembers.errors.txt | 48 +- .../subtypingWithObjectMembers2.errors.txt | 48 +- .../subtypingWithObjectMembers3.errors.txt | 48 +- .../subtypingWithObjectMembers5.errors.txt | 12 +- ...gWithObjectMembersAccessibility.errors.txt | 12 +- ...WithObjectMembersAccessibility2.errors.txt | 24 +- ...ngWithObjectMembersOptionality2.errors.txt | 14 +- .../subtypingWithStringIndexer.errors.txt | 12 +- .../subtypingWithStringIndexer2.errors.txt | 30 +- .../subtypingWithStringIndexer3.errors.txt | 30 +- .../subtypingWithStringIndexer4.errors.txt | 26 +- tests/baselines/reference/super.errors.txt | 2 +- tests/baselines/reference/super1.errors.txt | 8 +- .../reference/superAccess.errors.txt | 6 +- .../reference/superAccess2.errors.txt | 26 +- .../superCallAssignResult.errors.txt | 2 +- ...CallInConstructorWithNoBaseType.errors.txt | 4 +- .../superCallInNonStaticMethod.errors.txt | 4 +- .../superCallInStaticMethod.errors.txt | 4 +- .../superCallOutsideConstructor.errors.txt | 6 +- .../superCallsInConstructor.errors.txt | 2 +- .../reference/superErrors.errors.txt | 32 +- .../superInConstructorParam1.errors.txt | 4 +- .../reference/superInLambdas.errors.txt | 8 +- .../reference/superPropertyAccess.errors.txt | 16 +- .../reference/superPropertyAccess1.errors.txt | 10 +- .../reference/superPropertyAccess2.errors.txt | 12 +- .../superPropertyAccessNoError.errors.txt | 8 +- .../superWithTypeArgument.errors.txt | 4 +- .../superWithTypeArgument2.errors.txt | 4 +- .../superWithTypeArgument3.errors.txt | 2 +- ...ect-literal-getters-and-setters.errors.txt | 14 +- .../switchAssignmentCompat.errors.txt | 2 +- ...itchCasesExpressionTypeMismatch.errors.txt | 6 +- ...hStatementsWithMultipleDefaults.errors.txt | 18 +- .../reference/targetTypeBaseCalls.errors.txt | 6 +- .../reference/targetTypeCastTest.errors.txt | 2 +- .../reference/targetTypeTest1.errors.txt | 6 +- .../reference/targetTypeTest3.errors.txt | 4 +- .../reference/targetTypeVoidFunc.errors.txt | 2 +- .../reference/testTypings.errors.txt | 2 +- .../reference/thisBinding.errors.txt | 2 +- ...CallExpressionWithTypeArguments.errors.txt | 2 +- .../reference/thisInAccessors.errors.txt | 12 +- ...rowFunctionInStaticInitializer1.errors.txt | 2 +- .../thisInConstructorParameter1.errors.txt | 2 +- .../thisInConstructorParameter2.errors.txt | 6 +- .../thisInInvalidContexts.errors.txt | 14 +- ...InInvalidContextsExternalModule.errors.txt | 18 +- .../reference/thisInModule.errors.txt | 2 +- .../reference/thisInOuterClassBody.errors.txt | 6 +- .../reference/thisInStatics.errors.txt | 2 +- .../reference/thisInSuperCall.errors.txt | 4 +- .../reference/thisInSuperCall1.errors.txt | 2 +- .../reference/thisInSuperCall2.errors.txt | 2 +- .../reference/thisInSuperCall3.errors.txt | 2 +- .../reference/thisKeyword.errors.txt | 2 +- .../thisWhenTypeCheckFails.errors.txt | 2 +- ...side-enum-should-not-be-allowed.errors.txt | 4 +- ...ect-literal-getters-and-setters.errors.txt | 4 +- .../tooManyTypeParameters1.errors.txt | 8 +- .../topLevelFileModuleMissing.errors.txt | 2 +- .../reference/topLevelLambda.errors.txt | 2 +- ...opLevelModuleDeclarationAndFile.errors.txt | 2 +- ...ommaInHeterogenousArrayLiteral1.errors.txt | 8 +- ...trailingSeparatorInFunctionCall.errors.txt | 4 +- .../twoAccessorsWithSameName.errors.txt | 28 +- .../twoAccessorsWithSameName2.errors.txt | 16 +- ...cesDifferingByTypeParameterName.errors.txt | 10 +- ...esDifferingByTypeParameterName2.errors.txt | 8 +- ...erfacesWithDifferentConstraints.errors.txt | 6 +- ...ithTheSameNameButDifferentArity.errors.txt | 6 +- ...woInterfacesDifferentRootModule.errors.txt | 4 +- ...oInterfacesDifferentRootModule2.errors.txt | 8 +- .../typeArgInference2WithError.errors.txt | 2 +- ...peArgumentConstraintResolution1.errors.txt | 6 +- ...entInferenceConstructSignatures.errors.txt | 16 +- .../typeArgumentInferenceErrors.errors.txt | 8 +- ...tInferenceTransitiveConstraints.errors.txt | 6 +- ...rgumentInferenceWithConstraints.errors.txt | 26 +- ...OnFunctionsWithNoTypeParameters.errors.txt | 6 +- ...ouldDisallowNonGenericOverloads.errors.txt | 4 +- ...eAssertionToGenericFunctionType.errors.txt | 4 +- .../reference/typeAssertions.errors.txt | 14 +- .../typeCheckTypeArgument.errors.txt | 28 +- ...InsideFunctionExpressionInArray.errors.txt | 8 +- .../typeIdentityConsidersBrands.errors.txt | 6 +- .../baselines/reference/typeInfer1.errors.txt | 4 +- .../baselines/reference/typeMatch1.errors.txt | 10 +- .../baselines/reference/typeMatch2.errors.txt | 30 +- .../baselines/reference/typeName1.errors.txt | 56 +- .../typeOfEnumAndVarRedeclarations.errors.txt | 2 +- .../reference/typeOfOnTypeArg.errors.txt | 2 +- .../reference/typeOfOperator1.errors.txt | 2 +- .../baselines/reference/typeOfThis.errors.txt | 16 +- .../reference/typeOfThisInAccessor.errors.txt | 10 +- ...ypeOfThisInConstructorParamList.errors.txt | 2 +- .../typeOfThisInInstanceMember.errors.txt | 4 +- .../typeOfThisInInstanceMember2.errors.txt | 2 +- .../typeOfThisInStaticMembers2.errors.txt | 4 +- .../reference/typeOfThisInStatics.errors.txt | 2 +- .../typeParamExtendsOtherTypeParam.errors.txt | 4 +- ...ypeParameterArgumentEquivalence.errors.txt | 12 +- ...peParameterArgumentEquivalence2.errors.txt | 12 +- ...peParameterArgumentEquivalence3.errors.txt | 8 +- ...peParameterArgumentEquivalence4.errors.txt | 8 +- ...peParameterArgumentEquivalence5.errors.txt | 12 +- .../typeParameterAsBaseClass.errors.txt | 4 +- .../typeParameterAsBaseType.errors.txt | 8 +- ...ameterAsTypeParameterConstraint.errors.txt | 4 +- ...meterAsTypeParameterConstraint2.errors.txt | 4 +- .../typeParameterAssignability.errors.txt | 4 +- .../typeParameterAssignability2.errors.txt | 94 +- .../typeParameterAssignability3.errors.txt | 8 +- .../typeParameterAssignmentCompat1.errors.txt | 16 +- ...ameterAssignmentWithConstraints.errors.txt | 4 +- .../typeParameterConstraints1.errors.txt | 12 +- ...eterDirectlyConstrainedToItself.errors.txt | 20 +- ...peParameterExplicitlyExtendsAny.errors.txt | 6 +- ...ypeParameterHasSelfAsConstraint.errors.txt | 4 +- ...erIndirectlyConstrainedToItself.errors.txt | 56 +- .../typeParameterOrderReversal.errors.txt | 4 +- .../typeParameterUsedAsConstraint.errors.txt | 80 +- ...erUsedAsTypeParameterConstraint.errors.txt | 36 +- ...rUsedAsTypeParameterConstraint2.errors.txt | 36 +- ...rUsedAsTypeParameterConstraint4.errors.txt | 58 +- ...ameterWithInvalidConstraintType.errors.txt | 2 +- ...typeParametersInStaticAccessors.errors.txt | 8 +- .../typeParametersInStaticMethods.errors.txt | 4 +- ...ypeParametersInStaticProperties.errors.txt | 2 +- .../typeParametersShouldNotBeEqual.errors.txt | 4 +- ...typeParametersShouldNotBeEqual2.errors.txt | 12 +- ...typeParametersShouldNotBeEqual3.errors.txt | 4 +- .../reference/typeQueryOnClass.errors.txt | 12 +- .../reference/typeValueConflict1.errors.txt | 2 +- .../reference/typeValueConflict2.errors.txt | 2 +- .../typecheckCommaExpression.errors.txt | 4 +- .../reference/typecheckIfCondition.errors.txt | 4 +- .../typeofANonExportedType.errors.txt | 2 +- .../typeofAmbientExternalModules.errors.txt | 8 +- .../reference/typeofAnExportedType.errors.txt | 2 +- .../reference/typeofClass.errors.txt | 4 +- .../typeofClassWithPrivates.errors.txt | 2 +- .../typeofExternalModules.errors.txt | 8 +- .../typeofInObjectLiteralType.errors.txt | 2 +- .../typeofInternalModules.errors.txt | 14 +- ...typeofOperatorInvalidOperations.errors.txt | 6 +- .../typeofOperatorWithAnyOtherType.errors.txt | 6 +- .../reference/typeofProperty.errors.txt | 12 +- .../reference/typeofSimple.errors.txt | 4 +- .../reference/typeofTypeParameter.errors.txt | 2 +- .../reference/typeofUnknownSymbol.errors.txt | 2 +- ...yExternalModuleStillHasInstance.errors.txt | 4 +- ...ypesWithDuplicateTypeParameters.errors.txt | 12 +- .../typesWithPrivateConstructor.errors.txt | 10 +- .../typesWithPublicConstructor.errors.txt | 4 +- .../reference/unaryOperators1.errors.txt | 6 +- .../uncaughtCompilerError2.errors.txt | 2 +- .../reference/undeclaredBase.errors.txt | 2 +- .../reference/undeclaredMethod.errors.txt | 2 +- .../undeclaredModuleError.errors.txt | 6 +- .../reference/undeclaredVarEmit.errors.txt | 2 +- ...SymbolReferencedInArrayLiteral1.errors.txt | 6 +- .../undefinedTypeArgument1.errors.txt | 2 +- .../undefinedTypeArgument2.errors.txt | 4 +- ...xpectedStatementBlockTerminator.errors.txt | 2 +- .../unicodeIdentifierName2.errors.txt | 10 +- ...nknownSymbolInGenericReturnType.errors.txt | 2 +- ...unknownSymbolOffContextualType1.errors.txt | 2 +- .../reference/unknownSymbols1.errors.txt | 28 +- .../reference/unknownSymbols2.errors.txt | 20 +- .../reference/unknownTypeArgOnCall.errors.txt | 2 +- .../reference/unknownTypeErrors.errors.txt | 2 +- .../unqualifiedCallToClassStatic1.errors.txt | 2 +- .../unresolvedTypeAssertionSymbol.errors.txt | 2 +- .../unspecializedConstraints.errors.txt | 8 +- ...unterminatedRegexAtEndOfSource1.errors.txt | 4 +- ...atedStringLiteralWithBackslash1.errors.txt | 2 +- ...unctionCallsWithTypeParameters1.errors.txt | 22 +- .../reference/validNullAssignments.errors.txt | 10 +- .../reference/validRegexp.errors.txt | 2 +- .../varAndFunctionShareName.errors.txt | 2 +- ...arArgConstructorMemberParameter.errors.txt | 2 +- .../varArgWithNoParamName.errors.txt | 2 +- tests/baselines/reference/varBlock.errors.txt | 40 +- ...thImportInDifferentPartOfModule.errors.txt | 2 +- tests/baselines/reference/vararg.errors.txt | 16 +- ...rResolvedDuringContextualTyping.errors.txt | 6 +- .../reference/voidArrayLit.errors.txt | 2 +- .../voidAsNonAmbiguousReturnType.errors.txt | 2 +- .../voidOperatorInvalidOperations.errors.txt | 6 +- .../voidOperatorWithAnyOtherType.errors.txt | 6 +- .../reference/widenToAny1.errors.txt | 2 +- .../reference/widenToAny2.errors.txt | 2 +- .../reference/widenedTypes.errors.txt | 22 +- .../reference/withExportDecl.errors.txt | 2 +- .../reference/withStatement.errors.txt | 2 +- .../reference/withStatementErrors.errors.txt | 6 +- .../withStatementNestedScope.errors.txt | 2 +- .../reference/withStatements.errors.txt | 2 +- tests/baselines/reference/witness.errors.txt | 16 +- ...wrappedAndRecursiveConstraints2.errors.txt | 2 +- ...wrappedAndRecursiveConstraints4.errors.txt | 2 +- .../wrappedRecursiveGenericType.errors.txt | 6 +- 2236 files changed, 14368 insertions(+), 14368 deletions(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 5ee3139d8f..07007a2096 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -820,13 +820,13 @@ module Harness { .split('\n') .map(s => s.length > 0 && s.charAt(s.length - 1) === '\r' ? s.substr(0, s.length - 1) : s) .filter(s => s.length > 0) - .map(s => '!!! ' + s); + .map(s => '!!! ' + error.category + " TS" + error.code + ": " + s); errLines.forEach(e => outputLines.push(e)); totalErrorsReported++; } - // Report glovbal errors: + // Report global errors: var globalErrors = diagnostics.filter(err => !err.filename); globalErrors.forEach(err => outputErrorText(err)); @@ -917,7 +917,7 @@ module Harness { export function recreate(options?: { useMinimalDefaultLib: boolean; noImplicitAny: boolean; }) { } - /** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a testcase (i.e., describe/it) */ + /** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a test case (i.e., describe/it) */ var harnessCompiler: HarnessCompiler; /** Returns the singleton harness compiler instance for generating and running tests. diff --git a/tests/baselines/reference/ArrowFunction1.errors.txt b/tests/baselines/reference/ArrowFunction1.errors.txt index ed868daec1..d870e3aa0f 100644 --- a/tests/baselines/reference/ArrowFunction1.errors.txt +++ b/tests/baselines/reference/ArrowFunction1.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction1.ts (1 errors) ==== var v = (a: ) => { ~ -!!! Type expected. +!!! error TS1110: Type expected. }; \ No newline at end of file diff --git a/tests/baselines/reference/ArrowFunction2.errors.txt b/tests/baselines/reference/ArrowFunction2.errors.txt index eef47a30ba..0280474755 100644 --- a/tests/baselines/reference/ArrowFunction2.errors.txt +++ b/tests/baselines/reference/ArrowFunction2.errors.txt @@ -1,8 +1,8 @@ ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction2.ts (2 errors) ==== var v = (a: b,) => { ~ -!!! Trailing comma not allowed. +!!! error TS1009: Trailing comma not allowed. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. }; \ No newline at end of file diff --git a/tests/baselines/reference/ArrowFunction3.errors.txt b/tests/baselines/reference/ArrowFunction3.errors.txt index a286116ff2..3cd9a74bf4 100644 --- a/tests/baselines/reference/ArrowFunction3.errors.txt +++ b/tests/baselines/reference/ArrowFunction3.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ArrowFunctions/ArrowFunction3.ts (3 errors) ==== var v = (a): => { ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. }; \ No newline at end of file diff --git a/tests/baselines/reference/ArrowFunctionExpression1.errors.txt b/tests/baselines/reference/ArrowFunctionExpression1.errors.txt index 25c9af3d28..70d08e6c8a 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.errors.txt +++ b/tests/baselines/reference/ArrowFunctionExpression1.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/ArrowFunctionExpression1.ts (1 errors) ==== var v = (public x: string) => { }; ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. \ No newline at end of file +!!! error TS2369: A parameter property is only allowed in a constructor implementation. \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt index f7d6aafc01..07eb712c3f 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.errors.txt @@ -10,7 +10,7 @@ module clodule1 { function f(x: T) { } ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } class clodule2{ @@ -22,11 +22,11 @@ module clodule2 { var x: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. class D{ ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. id: string; value: U; } @@ -41,7 +41,7 @@ module clodule3 { export var y = { id: T }; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } class clodule4{ @@ -54,7 +54,7 @@ class D { name: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt index dad412363f..705e03cd50 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.errors.txt @@ -10,7 +10,7 @@ // error: duplicate identifier expected export function fn(x: T, y: T): T { ~~ -!!! Duplicate identifier 'fn'. +!!! error TS2300: Duplicate identifier 'fn'. return x; } } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt index c45ffab415..a9dd6c7b97 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.errors.txt @@ -10,7 +10,7 @@ // error: duplicate identifier expected export function fn(x: T, y: T): T { ~~ -!!! Duplicate identifier 'fn'. +!!! error TS2300: Duplicate identifier 'fn'. return x; } } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt index c38333f973..4b40715573 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.errors.txt @@ -11,7 +11,7 @@ export function fn(x: T, y: T): number { return clodule.sfn('a'); ~~~~~~~~~~~ -!!! Property 'clodule.sfn' is inaccessible. +!!! error TS2341: Property 'clodule.sfn' is inaccessible. } } diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt index eb2ef95f79..8fc032bd92 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt @@ -8,7 +8,7 @@ module Point { export function Origin() { return null; } //expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } @@ -22,6 +22,6 @@ export module Point { export function Origin() { return ""; }//expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt index ad395751eb..2ab968dc26 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.errors.txt @@ -8,7 +8,7 @@ module Point { export var Origin = ""; //expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } @@ -22,6 +22,6 @@ export module Point { export var Origin = ""; //expected duplicate identifier error ~~~~~~ -!!! Duplicate identifier 'Origin'. +!!! error TS2300: Duplicate identifier 'Origin'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt index d47fc51f4e..549fd2f1cb 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt @@ -14,7 +14,7 @@ module X.Y { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); } } diff --git a/tests/baselines/reference/ClassDeclaration10.errors.txt b/tests/baselines/reference/ClassDeclaration10.errors.txt index be26c1d5b4..d911432594 100644 --- a/tests/baselines/reference/ClassDeclaration10.errors.txt +++ b/tests/baselines/reference/ClassDeclaration10.errors.txt @@ -2,8 +2,8 @@ class C { constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration11.errors.txt b/tests/baselines/reference/ClassDeclaration11.errors.txt index b92a04cec6..85cf5b5092 100644 --- a/tests/baselines/reference/ClassDeclaration11.errors.txt +++ b/tests/baselines/reference/ClassDeclaration11.errors.txt @@ -2,6 +2,6 @@ class C { constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. foo() { } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration13.errors.txt b/tests/baselines/reference/ClassDeclaration13.errors.txt index 406d41c20d..08e92f9330 100644 --- a/tests/baselines/reference/ClassDeclaration13.errors.txt +++ b/tests/baselines/reference/ClassDeclaration13.errors.txt @@ -3,5 +3,5 @@ foo(); bar() { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration14.errors.txt b/tests/baselines/reference/ClassDeclaration14.errors.txt index cf181a7eb8..1974b45050 100644 --- a/tests/baselines/reference/ClassDeclaration14.errors.txt +++ b/tests/baselines/reference/ClassDeclaration14.errors.txt @@ -2,8 +2,8 @@ class C { foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration15.errors.txt b/tests/baselines/reference/ClassDeclaration15.errors.txt index 08c33f1875..17653687f3 100644 --- a/tests/baselines/reference/ClassDeclaration15.errors.txt +++ b/tests/baselines/reference/ClassDeclaration15.errors.txt @@ -2,6 +2,6 @@ class C { foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. constructor() { } } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration21.errors.txt b/tests/baselines/reference/ClassDeclaration21.errors.txt index 8b49f1df54..b973f6a3f4 100644 --- a/tests/baselines/reference/ClassDeclaration21.errors.txt +++ b/tests/baselines/reference/ClassDeclaration21.errors.txt @@ -3,5 +3,5 @@ 0(); 1() { } ~ -!!! Function implementation name must be '0'. +!!! error TS2389: Function implementation name must be '0'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration22.errors.txt b/tests/baselines/reference/ClassDeclaration22.errors.txt index 34832185e1..af64776d47 100644 --- a/tests/baselines/reference/ClassDeclaration22.errors.txt +++ b/tests/baselines/reference/ClassDeclaration22.errors.txt @@ -3,5 +3,5 @@ "foo"(); "bar"() { } ~~~~~ -!!! Function implementation name must be '"foo"'. +!!! error TS2389: Function implementation name must be '"foo"'. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration24.errors.txt b/tests/baselines/reference/ClassDeclaration24.errors.txt index a64ad65899..65ac017be6 100644 --- a/tests/baselines/reference/ClassDeclaration24.errors.txt +++ b/tests/baselines/reference/ClassDeclaration24.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/ClassDeclaration24.ts (1 errors) ==== class any { ~~~ -!!! Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any' } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration25.errors.txt b/tests/baselines/reference/ClassDeclaration25.errors.txt index 3a73349506..d44f7dd2e1 100644 --- a/tests/baselines/reference/ClassDeclaration25.errors.txt +++ b/tests/baselines/reference/ClassDeclaration25.errors.txt @@ -6,9 +6,9 @@ class List implements IList { data(): U; ~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. next(): string; ~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration8.errors.txt b/tests/baselines/reference/ClassDeclaration8.errors.txt index ebf1cadd76..08efca98e4 100644 --- a/tests/baselines/reference/ClassDeclaration8.errors.txt +++ b/tests/baselines/reference/ClassDeclaration8.errors.txt @@ -2,5 +2,5 @@ class C { constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. } \ No newline at end of file diff --git a/tests/baselines/reference/ClassDeclaration9.errors.txt b/tests/baselines/reference/ClassDeclaration9.errors.txt index 03813d1468..746baf9007 100644 --- a/tests/baselines/reference/ClassDeclaration9.errors.txt +++ b/tests/baselines/reference/ClassDeclaration9.errors.txt @@ -2,5 +2,5 @@ class C { foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/ExportAssignment7.errors.txt b/tests/baselines/reference/ExportAssignment7.errors.txt index ff05fb7eda..de7d6ad5cc 100644 --- a/tests/baselines/reference/ExportAssignment7.errors.txt +++ b/tests/baselines/reference/ExportAssignment7.errors.txt @@ -1,11 +1,11 @@ ==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ==== export class C { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. } export = B; ~~~~~~~~~~~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/ExportAssignment8.errors.txt b/tests/baselines/reference/ExportAssignment8.errors.txt index 2f1d1f5b96..b5c1e96b52 100644 --- a/tests/baselines/reference/ExportAssignment8.errors.txt +++ b/tests/baselines/reference/ExportAssignment8.errors.txt @@ -1,11 +1,11 @@ ==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ==== export = B; ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. export class C { } \ No newline at end of file diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt index b56c3a9fe9..5771b4f065 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.errors.txt @@ -8,11 +8,11 @@ export var UnitSquare : { top: { left: Point, right: Point }, ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. bottom: { left: Point, right: Point } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } = null; } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt index 1a9ea82a00..a8b93726b1 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt @@ -9,7 +9,7 @@ module A { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } } @@ -18,7 +18,7 @@ var fn: () => { x: number; y: number }; var fn = A.Point; ~~ -!!! Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. var cl: { x: number; y: number; } var cl = A.Point(); @@ -40,7 +40,7 @@ var fn: () => { x: number; y: number }; var fn = B.Point; // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected ~~ -!!! Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. var cl: { x: number; y: number; } var cl = B.Point(); diff --git a/tests/baselines/reference/FunctionDeclaration3.errors.txt b/tests/baselines/reference/FunctionDeclaration3.errors.txt index 40a5128344..049971706a 100644 --- a/tests/baselines/reference/FunctionDeclaration3.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration3.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/FunctionDeclaration3.ts (1 errors) ==== function foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file +!!! error TS2391: Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration4.errors.txt b/tests/baselines/reference/FunctionDeclaration4.errors.txt index da15ad0efa..175c39232a 100644 --- a/tests/baselines/reference/FunctionDeclaration4.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration4.errors.txt @@ -2,4 +2,4 @@ function foo(); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. \ No newline at end of file +!!! error TS2389: Function implementation name must be 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration6.errors.txt b/tests/baselines/reference/FunctionDeclaration6.errors.txt index c7e039cac1..d6dd9c3eff 100644 --- a/tests/baselines/reference/FunctionDeclaration6.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration6.errors.txt @@ -3,5 +3,5 @@ function foo(); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionDeclaration7.errors.txt b/tests/baselines/reference/FunctionDeclaration7.errors.txt index fcc48feb2d..d52f1110df 100644 --- a/tests/baselines/reference/FunctionDeclaration7.errors.txt +++ b/tests/baselines/reference/FunctionDeclaration7.errors.txt @@ -2,5 +2,5 @@ module M { function foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/InterfaceDeclaration8.errors.txt b/tests/baselines/reference/InterfaceDeclaration8.errors.txt index eba4ccd702..43242396e7 100644 --- a/tests/baselines/reference/InterfaceDeclaration8.errors.txt +++ b/tests/baselines/reference/InterfaceDeclaration8.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/InterfaceDeclaration8.ts (1 errors) ==== interface string { ~~~~~~ -!!! Interface name cannot be 'string' +!!! error TS2427: Interface name cannot be 'string' } \ No newline at end of file diff --git a/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt b/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt index c32511eba0..10fa0832c2 100644 --- a/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt +++ b/tests/baselines/reference/InvalidNonInstantiatedModule.errors.txt @@ -5,9 +5,9 @@ var m = M; // Error, not instantiated can not be used as var ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. var x: typeof M; // Error only a namespace ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. \ No newline at end of file diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt index c96547e0aa..654437cae0 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt +++ b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt @@ -2,7 +2,7 @@ class C { set Foo(public a: number) { } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt index f8e4561e9a..d8cb391310 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt @@ -2,7 +2,7 @@ module X.Y { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = new Point(0, 0); } } @@ -23,7 +23,7 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ==== module A { ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged export var Instance = new A(); } diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt index 707e0dec51..91c51f756d 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt @@ -2,7 +2,7 @@ module A { export module Point { ~~~~~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } } @@ -20,7 +20,7 @@ export module Point { ~~~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged export var Origin = { x: 0, y: 0 }; } diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt index d87dbe1a16..04729096a0 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedClasses.errors.txt @@ -30,9 +30,9 @@ // errors expected, these are not exported var a2 = new A.A2(); ~~ -!!! Property 'A2' does not exist on type 'typeof A'. +!!! error TS2339: Property 'A2' does not exist on type 'typeof A'. var ag2 = new A.A2(); ~~ -!!! Property 'A2' does not exist on type 'typeof A'. +!!! error TS2339: Property 'A2' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt index 59cbd67c91..72803ef89c 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.errors.txt @@ -10,5 +10,5 @@ // error not exported var b = A.Day.Monday; ~~~ -!!! Property 'Day' does not exist on type 'typeof A'. +!!! error TS2339: Property 'Day' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt index dc3b483346..0c38ae5760 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt @@ -28,7 +28,7 @@ // these should be errors since the functions are not exported var fn2 = A.fn2; ~~~ -!!! Property 'fn2' does not exist on type 'typeof A'. +!!! error TS2339: Property 'fn2' does not exist on type 'typeof A'. var fng2 = A.fng2; ~~~~ -!!! Property 'fng2' does not exist on type 'typeof A'. \ No newline at end of file +!!! error TS2339: Property 'fng2' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt index 07233c9678..7c37e1f4b3 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.errors.txt @@ -37,6 +37,6 @@ // not expected to work since non are exported var line = Geometry.Lines.Line; ~~~~~ -!!! Property 'Lines' does not exist on type 'typeof Geometry'. +!!! error TS2339: Property 'Lines' does not exist on type 'typeof Geometry'. \ No newline at end of file diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt index 737ec67733..2b5a296f35 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedVariables.errors.txt @@ -11,5 +11,5 @@ // Error, since y is not exported var y = A.y; ~ -!!! Property 'y' does not exist on type 'typeof A'. +!!! error TS2339: Property 'y' does not exist on type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList13.errors.txt b/tests/baselines/reference/ParameterList13.errors.txt index 63f41b0e23..8ade6309b8 100644 --- a/tests/baselines/reference/ParameterList13.errors.txt +++ b/tests/baselines/reference/ParameterList13.errors.txt @@ -2,5 +2,5 @@ interface I { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList4.errors.txt b/tests/baselines/reference/ParameterList4.errors.txt index e669cbfec6..010cbfdb7c 100644 --- a/tests/baselines/reference/ParameterList4.errors.txt +++ b/tests/baselines/reference/ParameterList4.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/ParameterList4.ts (1 errors) ==== function F(public A) { ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList5.errors.txt b/tests/baselines/reference/ParameterList5.errors.txt index 412fb71eb1..8fbe29025c 100644 --- a/tests/baselines/reference/ParameterList5.errors.txt +++ b/tests/baselines/reference/ParameterList5.errors.txt @@ -1,9 +1,9 @@ ==== tests/cases/compiler/ParameterList5.ts (3 errors) ==== function A(): (public B) => C { ~~~~~~~~~~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList6.errors.txt b/tests/baselines/reference/ParameterList6.errors.txt index c7037a3bb9..986384cf95 100644 --- a/tests/baselines/reference/ParameterList6.errors.txt +++ b/tests/baselines/reference/ParameterList6.errors.txt @@ -2,6 +2,6 @@ class C { constructor(C: (public A) => any) { ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList7.errors.txt b/tests/baselines/reference/ParameterList7.errors.txt index 6179eff50c..39da6e327c 100644 --- a/tests/baselines/reference/ParameterList7.errors.txt +++ b/tests/baselines/reference/ParameterList7.errors.txt @@ -2,9 +2,9 @@ class C1 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any) {} // OK } \ No newline at end of file diff --git a/tests/baselines/reference/ParameterList8.errors.txt b/tests/baselines/reference/ParameterList8.errors.txt index 950dfaaffa..097c1dbb3f 100644 --- a/tests/baselines/reference/ParameterList8.errors.txt +++ b/tests/baselines/reference/ParameterList8.errors.txt @@ -2,11 +2,11 @@ declare class C2 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any); // ERROR ~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt index 2540e2a071..7e3cb571cf 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.errors.txt @@ -10,7 +10,7 @@ // expected error export class Point { ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. origin: number; angle: number; } @@ -28,7 +28,7 @@ // expected error export class Line { ~~~~ -!!! Duplicate identifier 'Line'. +!!! error TS2300: Duplicate identifier 'Line'. name: string; } } diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt index 659efa3ecd..ce64af9503 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (1 errors) ==== export module A { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export interface Point { x: number; y: number; @@ -21,15 +21,15 @@ // collision with 'Origin' var in other part of merged module export var Origin: Point = { x: 0, y: 0 }; ~~~~~ -!!! Cannot find name 'Point'. +!!! error TS2304: Cannot find name 'Point'. export module Utils { export class Plane { constructor(public tl: Point, public br: Point) { } ~~~~~ -!!! Cannot find name 'Point'. +!!! error TS2304: Cannot find name 'Point'. ~~~~~ -!!! Cannot find name 'Point'. +!!! error TS2304: Cannot find name 'Point'. } } } diff --git a/tests/baselines/reference/TypeArgumentList1.errors.txt b/tests/baselines/reference/TypeArgumentList1.errors.txt index 6c1a300f5a..0315ab27ba 100644 --- a/tests/baselines/reference/TypeArgumentList1.errors.txt +++ b/tests/baselines/reference/TypeArgumentList1.errors.txt @@ -1,12 +1,12 @@ ==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts (5 errors) ==== Foo(4, 5, 6); -!!! Invalid character. +!!! error TS1127: Invalid character. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~ -!!! Cannot find name 'C'. \ No newline at end of file +!!! error TS2304: Cannot find name 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt b/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt index df4fe1ecf9..71cca6d462 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.errors.txt @@ -3,12 +3,12 @@ class C { set X(public v) { } ~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. static set X(public v2) { } ~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithES3.errors.txt b/tests/baselines/reference/accessorWithES3.errors.txt index a16d23d28c..5a5bf3c905 100644 --- a/tests/baselines/reference/accessorWithES3.errors.txt +++ b/tests/baselines/reference/accessorWithES3.errors.txt @@ -5,7 +5,7 @@ class C { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } } @@ -13,18 +13,18 @@ class D { set x(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } var x = { get a() { return 1 } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var y = { set b(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithInitializer.errors.txt b/tests/baselines/reference/accessorWithInitializer.errors.txt index 127bfdc8d8..5ab85f8eb1 100644 --- a/tests/baselines/reference/accessorWithInitializer.errors.txt +++ b/tests/baselines/reference/accessorWithInitializer.errors.txt @@ -3,8 +3,8 @@ class C { set X(v = 0) { } ~ -!!! A 'set' accessor parameter cannot have an initializer. +!!! error TS1052: A 'set' accessor parameter cannot have an initializer. static set X(v2 = 0) { } ~ -!!! A 'set' accessor parameter cannot have an initializer. +!!! error TS1052: A 'set' accessor parameter cannot have an initializer. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithRestParam.errors.txt b/tests/baselines/reference/accessorWithRestParam.errors.txt index 10f4633805..91b1be0ab6 100644 --- a/tests/baselines/reference/accessorWithRestParam.errors.txt +++ b/tests/baselines/reference/accessorWithRestParam.errors.txt @@ -3,8 +3,8 @@ class C { set X(...v) { } ~ -!!! A 'set' accessor cannot have rest parameter. +!!! error TS1053: A 'set' accessor cannot have rest parameter. static set X(...v2) { } ~ -!!! A 'set' accessor cannot have rest parameter. +!!! error TS1053: A 'set' accessor cannot have rest parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt b/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt index b108ea940a..e2159313e1 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt @@ -4,12 +4,12 @@ class C { set x(v: (a: string) => string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return (x: string) => ""; } } diff --git a/tests/baselines/reference/accessorsEmit.errors.txt b/tests/baselines/reference/accessorsEmit.errors.txt index 54bfafec64..b3860e70e3 100644 --- a/tests/baselines/reference/accessorsEmit.errors.txt +++ b/tests/baselines/reference/accessorsEmit.errors.txt @@ -4,7 +4,7 @@ class Test { get Property(): Result { ~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = 1; return null; } @@ -13,7 +13,7 @@ class Test2 { get Property() { ~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = 1; return null; } diff --git a/tests/baselines/reference/accessorsInAmbientContext.errors.txt b/tests/baselines/reference/accessorsInAmbientContext.errors.txt index fe7dfb361f..28b35e950d 100644 --- a/tests/baselines/reference/accessorsInAmbientContext.errors.txt +++ b/tests/baselines/reference/accessorsInAmbientContext.errors.txt @@ -4,32 +4,32 @@ class C { get X() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. set X(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static get Y() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static set Y(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } } declare class C { get X() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. set X(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static get Y() { return 1; } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. static set Y(v) { } ~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } \ No newline at end of file diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt b/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt index 3233ba9b5e..9a174f0e18 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt +++ b/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt @@ -3,9 +3,9 @@ class C { get x(): number { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var y = { get foo() { return 3; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt index be2d5d10ef..b7872d9d40 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt @@ -2,37 +2,37 @@ class LanguageSpec_section_4_5_error_cases { public set AnnotatedSetter_SetterFirst(a: number) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get AnnotatedSetter_SetterFirst() { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. public get AnnotatedSetter_SetterLast() { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. public set AnnotatedSetter_SetterLast(a: number) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get AnnotatedGetter_GetterFirst(): string { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set AnnotatedGetter_GetterFirst(aStr) { aStr = 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. public set AnnotatedGetter_GetterLast(aStr) { aStr = 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. public get AnnotatedGetter_GetterLast(): string { return ""; } ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt index 6f30cec38e..3184d842ec 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt @@ -6,44 +6,44 @@ public set InferredGetterFromSetterAnnotation(a: A) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredGetterFromSetterAnnotation() { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredGetterFromSetterAnnotation_GetterFirst() { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredGetterFromSetterAnnotation_GetterFirst(a: A) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredFromGetter() { return new B(); } ~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredFromGetter(a) { } ~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredFromGetter_SetterFirst(a) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredFromGetter_SetterFirst() { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredSetterFromGetterAnnotation(a) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredSetterFromGetterAnnotation() : A { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get InferredSetterFromGetterAnnotation_GetterFirst() : A { return new B(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set InferredSetterFromGetterAnnotation_GetterFirst(a) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt index 36b4561263..df05641e92 100644 --- a/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt +++ b/tests/baselines/reference/addMoreOverloadsToBaseSignature.errors.txt @@ -5,9 +5,9 @@ interface Bar extends Foo { ~~~ -!!! Interface 'Bar' incorrectly extends interface 'Foo': -!!! Types of property 'f' are incompatible: -!!! Type '(key: string) => string' is not assignable to type '() => string'. +!!! error TS2429: Interface 'Bar' incorrectly extends interface 'Foo': +!!! error TS2429: Types of property 'f' are incompatible: +!!! error TS2429: Type '(key: string) => string' is not assignable to type '() => string'. f(key: string): string; } \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt index 607a76b103..d8dc7a06c8 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.errors.txt @@ -15,65 +15,65 @@ // boolean + every type except any and string var r1 = a + a; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r2 = a + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. var r3 = a + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'Object'. // number + every type except any and string var r4 = b + a; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. var r5 = b + b; // number + number is valid var r6 = b + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'Object'. // object + every type except any and string var r7 = c + a; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'boolean'. var r8 = c + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'number'. var r9 = c + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. // other cases var r10 = a + true; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r11 = true + false; ~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r12 = true + 123; ~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'number'. var r13 = {} + {}; ~~~~~~~ -!!! Operator '+' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+' cannot be applied to types '{}' and '{}'. var r14 = b + d; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'Number'. var r15 = b + foo; ~~~~~~~ -!!! Operator '+' cannot be applied to types 'number' and '() => void'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and '() => void'. var r16 = b + foo(); ~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'void'. var r17 = b + C; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'typeof C'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'typeof C'. var r18 = E.a + new C(); ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'C'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'C'. var r19 = E.a + C.foo(); ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'void'. var r20 = E.a + M; ~~~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'typeof M'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'typeof M'. \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt index 230210c258..f2ba656f3a 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.errors.txt @@ -11,36 +11,36 @@ // null + boolean/Object var r1 = null + a; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r2 = null + b; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r3 = null + c; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r4 = a + null; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r5 = b + null; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r6 = null + c; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. // other cases var r7 = null + d; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. var r8 = null + true; ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r9 = null + { a: '' }; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. +!!! error TS2365: Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. var r10 = null + foo(); ~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r11 = null + (() => { }); ~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index fad515948b..2b107c4171 100644 --- a/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/additionOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -2,13 +2,13 @@ // bug 819721 var r1 = null + null; ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var r2 = null + undefined; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var r3 = undefined + null; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var r4 = undefined + undefined; ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt index 5b08447724..e2fc8a7547 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.errors.txt @@ -15,57 +15,57 @@ var r1: any = t + a; // ok, one operand is any var r2 = t + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'boolean'. var r3 = t + c; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'number'. var r4 = t + d; // ok, one operand is string var r5 = t + e; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'Object'. var r6 = t + g; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'E'. var r7 = t + f; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'void'. // type parameter as right operand var r8 = a + t; // ok, one operand is any var r9 = b + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'T'. var r10 = c + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'T'. var r11 = d + t; // ok, one operand is string var r12 = e + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'T'. var r13 = g + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'T'. var r14 = f + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'T'. // other cases var r15 = t + null; ~~~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var r16 = t + undefined; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var r17 = t + t; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var r18 = t + u; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'U'. var r19 = t + (() => { }); ~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and '() => void'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and '() => void'. var r20 = t + []; ~~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'undefined[]'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'undefined[]'. } \ No newline at end of file diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 95b1f4055a..cb1d0112f2 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -11,36 +11,36 @@ // undefined + boolean/Object var r1 = undefined + a; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r2 = undefined + b; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r3 = undefined + c; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r4 = a + undefined; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r5 = b + undefined; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Object' and 'Object'. +!!! error TS2365: Operator '+' cannot be applied to types 'Object' and 'Object'. var r6 = undefined + c; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. // other cases var r7 = undefined + d; ~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'Number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. var r8 = undefined + true; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'boolean' and 'boolean'. var r9 = undefined + { a: '' }; ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. +!!! error TS2365: Operator '+' cannot be applied to types '{ a: string; }' and '{ a: string; }'. var r10 = undefined + foo(); ~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+' cannot be applied to types 'void' and 'void'. var r11 = undefined + (() => { }); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file +!!! error TS2365: Operator '+' cannot be applied to types '() => void' and '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/aliasAssignments.errors.txt b/tests/baselines/reference/aliasAssignments.errors.txt index d75b8d5145..383ab88b50 100644 --- a/tests/baselines/reference/aliasAssignments.errors.txt +++ b/tests/baselines/reference/aliasAssignments.errors.txt @@ -3,12 +3,12 @@ var x = moduleA; x = 1; // Should be error ~ -!!! Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"': -!!! Property 'someClass' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"': +!!! error TS2322: Property 'someClass' is missing in type 'Number'. var y = 1; y = moduleA; // should be error ~ -!!! Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'. +!!! error TS2323: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'. ==== tests/cases/compiler/aliasAssignments_moduleA.ts (0 errors) ==== export class someClass { diff --git a/tests/baselines/reference/aliasBug.errors.txt b/tests/baselines/reference/aliasBug.errors.txt index 1e7434c19b..8998a33dc1 100644 --- a/tests/baselines/reference/aliasBug.errors.txt +++ b/tests/baselines/reference/aliasBug.errors.txt @@ -17,7 +17,7 @@ var p2: foo.Provide; var p3:booz.bar; ~~~~~~~~ -!!! Module 'foo.bar.baz' has no exported member 'bar'. +!!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. var p22 = new provide.Provide(); } \ No newline at end of file diff --git a/tests/baselines/reference/aliasErrors.errors.txt b/tests/baselines/reference/aliasErrors.errors.txt index 4407771ce5..a0ffe5fe93 100644 --- a/tests/baselines/reference/aliasErrors.errors.txt +++ b/tests/baselines/reference/aliasErrors.errors.txt @@ -11,22 +11,22 @@ import m = no; ~~~~~~~~~~~~~~ -!!! Cannot find name 'no'. +!!! error TS2304: Cannot find name 'no'. import m2 = no.mod; ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'no'. +!!! error TS2304: Cannot find name 'no'. import n = 5; ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. import o = "s"; ~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. import q = null; ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. import r = undefined; ~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'undefined'. +!!! error TS2304: Cannot find name 'undefined'. var p = new provide.Provide(); @@ -38,7 +38,7 @@ var p2: foo.Provide; var p3:booz.bar; ~~~~~~~~ -!!! Module 'foo.bar.baz' has no exported member 'bar'. +!!! error TS2305: Module 'foo.bar.baz' has no exported member 'bar'. var p22 = new provide.Provide(); } diff --git a/tests/baselines/reference/aliasInaccessibleModule.errors.txt b/tests/baselines/reference/aliasInaccessibleModule.errors.txt index 839ea965b0..48cbd9a8e5 100644 --- a/tests/baselines/reference/aliasInaccessibleModule.errors.txt +++ b/tests/baselines/reference/aliasInaccessibleModule.errors.txt @@ -4,5 +4,5 @@ } export import X = N; ~~~~~~~~~~~~~~~~~~~~ -!!! Import declaration 'X' is using private name 'N'. +!!! error TS4000: Import declaration 'X' is using private name 'N'. } \ No newline at end of file diff --git a/tests/baselines/reference/aliasInaccessibleModule2.errors.txt b/tests/baselines/reference/aliasInaccessibleModule2.errors.txt index 149410acb1..0d18a74b50 100644 --- a/tests/baselines/reference/aliasInaccessibleModule2.errors.txt +++ b/tests/baselines/reference/aliasInaccessibleModule2.errors.txt @@ -7,6 +7,6 @@ } import R = N; ~~~~~~~~~~~~~ -!!! Import declaration 'R' is using private name 'N'. +!!! error TS4000: Import declaration 'R' is using private name 'N'. export import X = R; } \ No newline at end of file diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt index 8736a2e7ae..decf0503ab 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.errors.txt @@ -5,7 +5,7 @@ z.bar("hello"); // This should be ok var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be error ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. ==== tests/cases/compiler/aliasOnMergedModuleInterface_0.ts (0 errors) ==== declare module "foo" diff --git a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt index 3185336f8f..5ea6da939f 100644 --- a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt +++ b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.errors.txt @@ -2,7 +2,7 @@ import moduleA = require("aliasWithInterfaceExportAssignmentUsedInVarInitializer_0"); var d = b.q3; ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ==== tests/cases/compiler/aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.ts (0 errors) ==== interface c { q3: number; diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt index ed00c2a4a1..e0e0431fcd 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt +++ b/tests/baselines/reference/ambientClassOverloadForFunction.errors.txt @@ -2,5 +2,5 @@ declare class foo{}; function foo() { return null; } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/ambientDeclarationsExternal.errors.txt b/tests/baselines/reference/ambientDeclarationsExternal.errors.txt index 94b3c770d6..9e40f33d0f 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsExternal.errors.txt @@ -2,7 +2,7 @@ /// import imp1 = require('equ'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. // Ambient external module members are always exported with or without export keyword when module lacks export assignment diff --git a/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt b/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt index 159204675e..19d74cd9e6 100644 --- a/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt +++ b/tests/baselines/reference/ambientEnumElementInitializer3.errors.txt @@ -2,5 +2,5 @@ declare enum E { e = 3.3 // Decimal ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientErrors.errors.txt b/tests/baselines/reference/ambientErrors.errors.txt index 146f932210..95250d1084 100644 --- a/tests/baselines/reference/ambientErrors.errors.txt +++ b/tests/baselines/reference/ambientErrors.errors.txt @@ -2,13 +2,13 @@ // Ambient variable with an initializer declare var x = 4; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. // Ambient functions with invalid overloads declare function fn(x: number): string; declare function fn(x: 'foo'): number; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. // Ambient functions with duplicate signatures declare function fn1(x: number): string; @@ -21,51 +21,51 @@ // Ambient function with default parameter values declare function fn3(x = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. // Ambient function with function body declare function fn4() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. // Ambient enum with non - integer literal constant member declare enum E1 { y = 4.23 ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } // Ambient enum with computer member declare enum E2 { x = 'foo'.length ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } // Ambient module with initializers for values, bodies for functions / classes declare module M1 { var x = 3; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. function fn() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. class C { static x = 3; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. y = 4; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. constructor() { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. fn() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static sfn() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } } @@ -73,13 +73,13 @@ module M2 { declare module 'nope' { } ~~~~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. } // Ambient external module with a string literal name that isn't a top level external module name declare module '../foo' { } ~~~~~~~~ -!!! Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient external module declaration cannot specify relative module name. // Ambient external module with export assignment and other exported members declare module 'bar' { @@ -87,6 +87,6 @@ export var q; export = n; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index d5fd7ed229..07c6dc54b6 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -5,12 +5,12 @@ declare module "ext" { ~~~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. export class C { } } // Cannot resolve this ext module reference import ext = require("ext"); ~~~~~ -!!! Cannot find external module 'ext'. +!!! error TS2307: Cannot find external module 'ext'. var x = ext; \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt index ca8ceb6d3e..b4f65aa62c 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbient.errors.txt @@ -2,5 +2,5 @@ module M { export declare module "M" { } ~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt index 44731cf625..10dceb3e3d 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/conformance/ambient/ambientExternalModuleInsideNonAmbientExternalModule.ts (1 errors) ==== export declare module "M" { } ~~~ -!!! Ambient external modules cannot be nested in other modules. \ No newline at end of file +!!! error TS2435: Ambient external modules cannot be nested in other modules. \ No newline at end of file diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt index 2f4779ebfa..72001327c1 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeExternalImportDeclaration.errors.txt @@ -2,9 +2,9 @@ declare module "OuterModule" { import m2 = require("./SubModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Import declaration in an ambient external module declaration cannot reference external module through relative external module name. +!!! error TS2439: Import declaration in an ambient external module declaration cannot reference external module through relative external module name. ~~~~~~~~~~~~~ -!!! Cannot find external module './SubModule'. +!!! error TS2307: Cannot find external module './SubModule'. class SubModule { public static StaticVar: number; public InstanceVar: number; diff --git a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt index fba44282cc..d4734d7eeb 100644 --- a/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleWithRelativeModuleName.errors.txt @@ -1,12 +1,12 @@ ==== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts (2 errors) ==== declare module "./relativeModule" { ~~~~~~~~~~~~~~~~~~ -!!! Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient external module declaration cannot specify relative module name. var x: string; } declare module ".\\relativeModule" { ~~~~~~~~~~~~~~~~~~~ -!!! Ambient external module declaration cannot specify relative module name. +!!! error TS2436: Ambient external module declaration cannot specify relative module name. var x: string; } \ No newline at end of file diff --git a/tests/baselines/reference/ambientGetters.errors.txt b/tests/baselines/reference/ambientGetters.errors.txt index a01c146d97..2f6217d30b 100644 --- a/tests/baselines/reference/ambientGetters.errors.txt +++ b/tests/baselines/reference/ambientGetters.errors.txt @@ -3,11 +3,11 @@ declare class A { get length() : number; ~~~~~~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } declare class B { get length() { return 0; } ~~~~~~ -!!! An accessor cannot be declared in an ambient context. +!!! error TS1086: An accessor cannot be declared in an ambient context. } \ No newline at end of file diff --git a/tests/baselines/reference/ambientWithStatements.errors.txt b/tests/baselines/reference/ambientWithStatements.errors.txt index 9f0927d076..be0fa6dbfc 100644 --- a/tests/baselines/reference/ambientWithStatements.errors.txt +++ b/tests/baselines/reference/ambientWithStatements.errors.txt @@ -2,37 +2,37 @@ declare module M { break; ~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. continue; ~~~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. debugger; ~~~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. do { } while (true); ~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. var x; for (x in null) { } ~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. ~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. if (true) { } else { } ~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. 1; ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. L: var y; ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. return; ~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. switch (x) { ~~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. case 1: break; default: @@ -40,10 +40,10 @@ } throw "nooo"; ~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. try { ~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. } catch (e) { } @@ -51,8 +51,8 @@ } with (x) { ~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. ~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. } } \ No newline at end of file diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt b/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt index 5547ccb63f..f2d3bddee0 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt +++ b/tests/baselines/reference/ambiguousGenericAssertion1.errors.txt @@ -4,13 +4,13 @@ var r2 = < (x: T) => T>f; // valid var r3 = <(x: T) => T>f; // ambiguous, appears to the parser as a << operation ~~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! ')' expected. +!!! error TS1005: ')' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/ambiguousOverload.errors.txt b/tests/baselines/reference/ambiguousOverload.errors.txt index 90e973ffba..63a443a0b7 100644 --- a/tests/baselines/reference/ambiguousOverload.errors.txt +++ b/tests/baselines/reference/ambiguousOverload.errors.txt @@ -5,7 +5,7 @@ var x: number = foof("s", null); var y: string = foof("s", null); ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. function foof2(bar: string, x): string; function foof2(bar: string, y): number; @@ -13,4 +13,4 @@ var x2: string = foof2("s", null); var y2: number = foof2("s", null); ~~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment1.errors.txt b/tests/baselines/reference/amdDependencyComment1.errors.txt index 97ce60ff1b..6e77f6ec91 100644 --- a/tests/baselines/reference/amdDependencyComment1.errors.txt +++ b/tests/baselines/reference/amdDependencyComment1.errors.txt @@ -3,5 +3,5 @@ import m1 = require("m2") ~~~~ -!!! Cannot find external module 'm2'. +!!! error TS2307: Cannot find external module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyComment2.errors.txt b/tests/baselines/reference/amdDependencyComment2.errors.txt index edab2e9c95..1db0e8817e 100644 --- a/tests/baselines/reference/amdDependencyComment2.errors.txt +++ b/tests/baselines/reference/amdDependencyComment2.errors.txt @@ -3,5 +3,5 @@ import m1 = require("m2") ~~~~ -!!! Cannot find external module 'm2'. +!!! error TS2307: Cannot find external module 'm2'. m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/anonymousModules.errors.txt b/tests/baselines/reference/anonymousModules.errors.txt index b50f759196..a552654b31 100644 --- a/tests/baselines/reference/anonymousModules.errors.txt +++ b/tests/baselines/reference/anonymousModules.errors.txt @@ -1,40 +1,40 @@ ==== tests/cases/compiler/anonymousModules.ts (13 errors) ==== module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. export var foo = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. export var bar = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~ -!!! Individual declarations in merged declaration bar must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration bar must be all exported or all local. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var bar = 2; ~~~ -!!! Individual declarations in merged declaration bar must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration bar must be all exported or all local. module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. var x = bar; } } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/anyAsConstructor.errors.txt b/tests/baselines/reference/anyAsConstructor.errors.txt index ffd31da404..be266af4e1 100644 --- a/tests/baselines/reference/anyAsConstructor.errors.txt +++ b/tests/baselines/reference/anyAsConstructor.errors.txt @@ -10,4 +10,4 @@ // grammar allows this for constructors var d = new x(x); // no error ~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt b/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt index 7fbe17d0e1..ad3c0769a8 100644 --- a/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt +++ b/tests/baselines/reference/anyAsGenericFunctionCall.errors.txt @@ -5,15 +5,15 @@ var x: any; var a = x(); ~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. var b = x('hello'); ~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. class C { foo: string; } var c = x(x); ~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. var d = x(x); ~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/anyAssignableToEveryType2.errors.txt b/tests/baselines/reference/anyAssignableToEveryType2.errors.txt index 927fe3c627..985d4871ef 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.errors.txt +++ b/tests/baselines/reference/anyAssignableToEveryType2.errors.txt @@ -114,7 +114,7 @@ interface I18 { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. [x: string]: U; foo: any; } diff --git a/tests/baselines/reference/anyDeclare.errors.txt b/tests/baselines/reference/anyDeclare.errors.txt index 0bb771b6d9..118d5f3366 100644 --- a/tests/baselines/reference/anyDeclare.errors.txt +++ b/tests/baselines/reference/anyDeclare.errors.txt @@ -4,6 +4,6 @@ var myFn; function myFn() { } ~~~~ -!!! Duplicate identifier 'myFn'. +!!! error TS2300: Duplicate identifier 'myFn'. } \ No newline at end of file diff --git a/tests/baselines/reference/anyIdenticalToItself.errors.txt b/tests/baselines/reference/anyIdenticalToItself.errors.txt index 36c31825cb..a734685a22 100644 --- a/tests/baselines/reference/anyIdenticalToItself.errors.txt +++ b/tests/baselines/reference/anyIdenticalToItself.errors.txt @@ -1,19 +1,19 @@ ==== tests/cases/compiler/anyIdenticalToItself.ts (3 errors) ==== function foo(x: any); ~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(x: any); function foo(x: any, y: number) { } class C { get X(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y: any; return y; } set X(v: any) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/apparentTypeSubtyping.errors.txt b/tests/baselines/reference/apparentTypeSubtyping.errors.txt index f5725bd07f..f2981db679 100644 --- a/tests/baselines/reference/apparentTypeSubtyping.errors.txt +++ b/tests/baselines/reference/apparentTypeSubtyping.errors.txt @@ -9,9 +9,9 @@ // is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T) class Derived extends Base { // error ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Types of property 'x' are incompatible: -!!! Type 'String' is not assignable to type 'string'. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'String' is not assignable to type 'string'. x: String; } diff --git a/tests/baselines/reference/apparentTypeSupertype.errors.txt b/tests/baselines/reference/apparentTypeSupertype.errors.txt index a2442d7122..8eff38da39 100644 --- a/tests/baselines/reference/apparentTypeSupertype.errors.txt +++ b/tests/baselines/reference/apparentTypeSupertype.errors.txt @@ -9,8 +9,8 @@ // is String (S) a subtype of U extends String (T)? Would only be true if we used the apparent type of U (T) class Derived extends Base { // error ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Types of property 'x' are incompatible: -!!! Type 'U' is not assignable to type 'string'. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'U' is not assignable to type 'string'. x: U; } \ No newline at end of file diff --git a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt index b894b6193e..f6166df976 100644 --- a/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt +++ b/tests/baselines/reference/argumentsBindsToFunctionScopeArgumentList.errors.txt @@ -3,6 +3,6 @@ function foo(a) { arguments = 10; /// This shouldnt be of type number and result in error. ~~~~~~~~~ -!!! Type 'number' is not assignable to type 'IArguments': -!!! Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'IArguments': +!!! error TS2322: Property 'length' is missing in type 'Number'. } \ No newline at end of file diff --git a/tests/baselines/reference/arithAssignTyping.errors.txt b/tests/baselines/reference/arithAssignTyping.errors.txt index cdeaf94829..714d066914 100644 --- a/tests/baselines/reference/arithAssignTyping.errors.txt +++ b/tests/baselines/reference/arithAssignTyping.errors.txt @@ -3,37 +3,37 @@ f += ''; // error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. f += 1; // error ~~~~~~ -!!! Operator '+=' cannot be applied to types 'typeof f' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types 'typeof f' and 'number'. f -= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f *= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f /= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f %= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f &= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f |= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f <<= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f >>= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f >>>= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. f ^= 1; // error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt index caa8c959d6..27ad08b2e1 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt +++ b/tests/baselines/reference/arithmeticOnInvalidTypes.errors.txt @@ -3,19 +3,19 @@ var y: Number; var z = x + y; ~~~~~ -!!! Operator '+' cannot be applied to types 'Number' and 'Number'. +!!! error TS2365: Operator '+' cannot be applied to types 'Number' and 'Number'. var z2 = x - y; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z3 = x * y; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z4 = x / y; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt b/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt index 5cb6824846..a497f24398 100644 --- a/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt +++ b/tests/baselines/reference/arithmeticOnInvalidTypes2.errors.txt @@ -2,21 +2,21 @@ var obj = function f(a: T, b: T) { var z1 = a + b; ~~~~~ -!!! Operator '+' cannot be applied to types 'T' and 'T'. +!!! error TS2365: Operator '+' cannot be applied to types 'T' and 'T'. var z2 = a - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z3 = a * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var z4 = a / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. return a; }; \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt index 359d6c8095..7b50baad4b 100644 --- a/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithInvalidOperands.errors.txt @@ -15,1688 +15,1688 @@ var r1a1 = a * a; //ok var r1a2 = a * b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = a * c; //ok var r1a4 = a * d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a5 = a * e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a6 = a * f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = b * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = b * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b4 = b * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b5 = b * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b6 = b * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = c * a; //ok var r1c2 = c * b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = c * c; //ok var r1c4 = c * d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c5 = c * e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c6 = c * f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = d * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = d * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = d * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d4 = d * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d5 = d * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d6 = d * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e1 = e * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e2 = e * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e3 = e * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e4 = e * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e5 = e * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e6 = e * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f1 = f * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f2 = f * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f3 = f * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f4 = f * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f5 = f * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f6 = f * f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g1 = E.a * a; //ok var r1g2 = E.a * b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g3 = E.a * c; //ok var r1g4 = E.a * d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g5 = E.a * e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1g6 = E.a * f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h1 = a * E.b; //ok var r1h2 = b * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h3 = c * E.b; //ok var r1h4 = d * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h5 = e * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1h6 = f * E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var r2a1 = a / a; //ok var r2a2 = a / b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = a / c; //ok var r2a4 = a / d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a5 = a / e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a6 = a / f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = b / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = b / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = b / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b4 = b / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b5 = b / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b6 = b / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = c / a; //ok var r2c2 = c / b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = c / c; //ok var r2c4 = c / d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c5 = c / e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c6 = c / f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = d / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = d / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = d / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d4 = d / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d5 = d / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d6 = d / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e1 = e / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e2 = e / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e3 = e / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e4 = e / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e5 = e / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e6 = e / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f1 = f / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f2 = f / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f3 = f / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f4 = f / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f5 = f / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2f6 = f / f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g1 = E.a / a; //ok var r2g2 = E.a / b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g3 = E.a / c; //ok var r2g4 = E.a / d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g5 = E.a / e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2g6 = E.a / f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h1 = a / E.b; //ok var r2h2 = b / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h3 = c / E.b; //ok var r2h4 = d / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h5 = e / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2h6 = f / E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var r3a1 = a % a; //ok var r3a2 = a % b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a3 = a % c; //ok var r3a4 = a % d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a5 = a % e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a6 = a % f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b1 = b % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b2 = b % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b3 = b % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b4 = b % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b5 = b % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b6 = b % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c1 = c % a; //ok var r3c2 = c % b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c3 = c % c; //ok var r3c4 = c % d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c5 = c % e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c6 = c % f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d1 = d % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d2 = d % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d3 = d % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d4 = d % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d5 = d % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d6 = d % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e1 = e % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e2 = e % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e3 = e % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e4 = e % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e5 = e % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3e6 = e % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f1 = f % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f2 = f % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f3 = f % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f4 = f % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f5 = f % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3f6 = f % f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g1 = E.a % a; //ok var r3g2 = E.a % b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g3 = E.a % c; //ok var r3g4 = E.a % d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g5 = E.a % e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3g6 = E.a % f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h1 = a % E.b; //ok var r3h2 = b % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h3 = c % E.b; //ok var r3h4 = d % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h5 = e % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3h6 = f % E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var r4a1 = a - a; //ok var r4a2 = a - b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a3 = a - c; //ok var r4a4 = a - d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a5 = a - e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a6 = a - f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b1 = b - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b2 = b - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b3 = b - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b4 = b - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b5 = b - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b6 = b - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c1 = c - a; //ok var r4c2 = c - b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c3 = c - c; //ok var r4c4 = c - d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c5 = c - e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c6 = c - f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d1 = d - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d2 = d - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d3 = d - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d4 = d - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d5 = d - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d6 = d - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e1 = e - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e2 = e - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e3 = e - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e4 = e - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e5 = e - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4e6 = e - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f1 = f - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f2 = f - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f3 = f - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f4 = f - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f5 = f - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4f6 = f - f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g1 = E.a - a; //ok var r4g2 = E.a - b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g3 = E.a - c; //ok var r4g4 = E.a - d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g5 = E.a - e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4g6 = E.a - f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h1 = a - E.b; //ok var r4h2 = b - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h3 = c - E.b; //ok var r4h4 = d - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h5 = e - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4h6 = f - E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var r5a1 = a << a; //ok var r5a2 = a << b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a3 = a << c; //ok var r5a4 = a << d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a5 = a << e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a6 = a << f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b1 = b << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b2 = b << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b3 = b << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b4 = b << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b5 = b << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b6 = b << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c1 = c << a; //ok var r5c2 = c << b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c3 = c << c; //ok var r5c4 = c << d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c5 = c << e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c6 = c << f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d1 = d << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d2 = d << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d3 = d << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d4 = d << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d5 = d << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d6 = d << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e1 = e << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e2 = e << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e3 = e << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e4 = e << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e5 = e << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5e6 = e << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f1 = f << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f2 = f << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f3 = f << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f4 = f << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f5 = f << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5f6 = f << f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g1 = E.a << a; //ok var r5g2 = E.a << b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g3 = E.a << c; //ok var r5g4 = E.a << d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g5 = E.a << e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5g6 = E.a << f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h1 = a << E.b; //ok var r5h2 = b << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h3 = c << E.b; //ok var r5h4 = d << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h5 = e << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5h6 = f << E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var r6a1 = a >> a; //ok var r6a2 = a >> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a3 = a >> c; //ok var r6a4 = a >> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a5 = a >> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a6 = a >> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b1 = b >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b2 = b >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b3 = b >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b4 = b >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b5 = b >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b6 = b >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c1 = c >> a; //ok var r6c2 = c >> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c3 = c >> c; //ok var r6c4 = c >> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c5 = c >> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c6 = c >> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d1 = d >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d2 = d >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d3 = d >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d4 = d >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d5 = d >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d6 = d >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e1 = e >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e2 = e >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e3 = e >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e4 = e >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e5 = e >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6e6 = e >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f1 = f >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f2 = f >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f3 = f >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f4 = f >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f5 = f >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6f6 = f >> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g1 = E.a >> a; //ok var r6g2 = E.a >> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g3 = E.a >> c; //ok var r6g4 = E.a >> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g5 = E.a >> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6g6 = E.a >> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h1 = a >> E.b; //ok var r6h2 = b >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h3 = c >> E.b; //ok var r6h4 = d >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h5 = e >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6h6 = f >> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var r7a1 = a >>> a; //ok var r7a2 = a >>> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a3 = a >>> c; //ok var r7a4 = a >>> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a5 = a >>> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a6 = a >>> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b1 = b >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b2 = b >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b3 = b >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b4 = b >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b5 = b >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b6 = b >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c1 = c >>> a; //ok var r7c2 = c >>> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c3 = c >>> c; //ok var r7c4 = c >>> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c5 = c >>> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c6 = c >>> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d1 = d >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d2 = d >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d3 = d >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d4 = d >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d5 = d >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d6 = d >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e1 = e >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e2 = e >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e3 = e >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e4 = e >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e5 = e >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7e6 = e >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f1 = f >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f2 = f >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f3 = f >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f4 = f >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f5 = f >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7f6 = f >>> f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g1 = E.a >>> a; //ok var r7g2 = E.a >>> b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g3 = E.a >>> c; //ok var r7g4 = E.a >>> d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g5 = E.a >>> e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7g6 = E.a >>> f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h1 = a >>> E.b; //ok var r7h2 = b >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h3 = c >>> E.b; //ok var r7h4 = d >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h5 = e >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7h6 = f >>> E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var r8a1 = a & a; //ok var r8a2 = a & b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a3 = a & c; //ok var r8a4 = a & d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a5 = a & e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a6 = a & f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b1 = b & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b2 = b & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b3 = b & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b4 = b & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b5 = b & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b6 = b & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c1 = c & a; //ok var r8c2 = c & b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c3 = c & c; //ok var r8c4 = c & d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c5 = c & e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c6 = c & f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d1 = d & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d2 = d & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d3 = d & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d4 = d & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d5 = d & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d6 = d & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e1 = e & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e2 = e & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e3 = e & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e4 = e & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e5 = e & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8e6 = e & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f1 = f & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f2 = f & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f3 = f & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f4 = f & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f5 = f & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8f6 = f & f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g1 = E.a & a; //ok var r8g2 = E.a & b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g3 = E.a & c; //ok var r8g4 = E.a & d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g5 = E.a & e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8g6 = E.a & f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h1 = a & E.b; //ok var r8h2 = b & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h3 = c & E.b; //ok var r8h4 = d & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h5 = e & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8h6 = f & E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var r9a1 = a ^ a; //ok var r9a2 = a ^ b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a3 = a ^ c; //ok var r9a4 = a ^ d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a5 = a ^ e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a6 = a ^ f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b1 = b ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b2 = b ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b3 = b ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b4 = b ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b5 = b ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b6 = b ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c1 = c ^ a; //ok var r9c2 = c ^ b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c3 = c ^ c; //ok var r9c4 = c ^ d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c5 = c ^ e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c6 = c ^ f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d1 = d ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d2 = d ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d3 = d ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d4 = d ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d5 = d ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d6 = d ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e1 = e ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e2 = e ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e3 = e ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e4 = e ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e5 = e ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9e6 = e ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f1 = f ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f2 = f ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f3 = f ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f4 = f ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f5 = f ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9f6 = f ^ f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g1 = E.a ^ a; //ok var r9g2 = E.a ^ b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g3 = E.a ^ c; //ok var r9g4 = E.a ^ d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g5 = E.a ^ e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9g6 = E.a ^ f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h1 = a ^ E.b; //ok var r9h2 = b ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h3 = c ^ E.b; //ok var r9h4 = d ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h5 = e ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9h6 = f ^ E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var r10a1 = a | a; //ok var r10a2 = a | b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a3 = a | c; //ok var r10a4 = a | d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a5 = a | e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a6 = a | f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b1 = b | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b2 = b | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b3 = b | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b4 = b | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b5 = b | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b6 = b | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c1 = c | a; //ok var r10c2 = c | b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c3 = c | c; //ok var r10c4 = c | d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c5 = c | e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c6 = c | f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d1 = d | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d2 = d | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d3 = d | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d4 = d | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d5 = d | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d6 = d | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e1 = e | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e2 = e | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e3 = e | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e4 = e | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e5 = e | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10e6 = e | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f1 = f | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f2 = f | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f3 = f | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f4 = f | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f5 = f | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10f6 = f | f; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g1 = E.a | a; //ok var r10g2 = E.a | b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g3 = E.a | c; //ok var r10g4 = E.a | d; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g5 = E.a | e; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10g6 = E.a | f; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h1 = a | E.b; //ok var r10h2 = b | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h3 = c | E.b; //ok var r10h4 = d | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h5 = e | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10h6 = f | E.b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt index 43c223bcd4..8014d17c71 100644 --- a/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithNullValueAndInvalidOperands.errors.txt @@ -9,649 +9,649 @@ // operator * var r1a1 = null * a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a2 = null * b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = null * c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = a * null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b * null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = c * null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = null * true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c2 = null * ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = null * {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = true * null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = '' * null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = {} * null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var r2a1 = null / a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a2 = null / b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = null / c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = a / null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = b / null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = c / null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = null / true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c2 = null / ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = null / {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = true / null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = '' / null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = {} / null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var r3a1 = null % a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a2 = null % b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a3 = null % c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b1 = a % null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b2 = b % null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b3 = c % null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c1 = null % true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c2 = null % ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c3 = null % {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d1 = true % null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d2 = '' % null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d3 = {} % null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var r4a1 = null - a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a2 = null - b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a3 = null - c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b1 = a - null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b2 = b - null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b3 = c - null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c1 = null - true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c2 = null - ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c3 = null - {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d1 = true - null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d2 = '' - null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d3 = {} - null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var r5a1 = null << a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a2 = null << b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a3 = null << c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b1 = a << null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b2 = b << null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b3 = c << null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c1 = null << true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c2 = null << ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c3 = null << {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d1 = true << null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d2 = '' << null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d3 = {} << null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var r6a1 = null >> a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a2 = null >> b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a3 = null >> c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b1 = a >> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b2 = b >> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b3 = c >> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c1 = null >> true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c2 = null >> ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c3 = null >> {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d1 = true >> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d2 = '' >> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d3 = {} >> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var r7a1 = null >>> a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a2 = null >>> b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a3 = null >>> c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b1 = a >>> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b2 = b >>> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b3 = c >>> null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c1 = null >>> true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c2 = null >>> ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c3 = null >>> {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d1 = true >>> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d2 = '' >>> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d3 = {} >>> null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var r8a1 = null & a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a2 = null & b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a3 = null & c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b1 = a & null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b2 = b & null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b3 = c & null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c1 = null & true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c2 = null & ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c3 = null & {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d1 = true & null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d2 = '' & null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d3 = {} & null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var r9a1 = null ^ a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a2 = null ^ b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a3 = null ^ c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b1 = a ^ null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b2 = b ^ null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b3 = c ^ null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c1 = null ^ true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c2 = null ^ ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c3 = null ^ {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d1 = true ^ null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d2 = '' ^ null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d3 = {} ^ null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var r10a1 = null | a; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a2 = null | b; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a3 = null | c; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b1 = a | null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b2 = b | null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b3 = c | null; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c1 = null | true; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c2 = null | ''; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c3 = null | {}; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d1 = true | null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d2 = '' | null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d3 = {} | null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt index dd63c076c7..d2df25bbb2 100644 --- a/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -2,219 +2,219 @@ // operator * var ra1 = null * null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ra2 = null * undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ra3 = undefined * null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ra4 = undefined * undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var rb1 = null / null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rb2 = null / undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rb3 = undefined / null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rb4 = undefined / undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var rc1 = null % null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rc2 = null % undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rc3 = undefined % null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rc4 = undefined % undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var rd1 = null - null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rd2 = null - undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rd3 = undefined - null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rd4 = undefined - undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var re1 = null << null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var re2 = null << undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var re3 = undefined << null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var re4 = undefined << undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var rf1 = null >> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rf2 = null >> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rf3 = undefined >> null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rf4 = undefined >> undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var rg1 = null >>> null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rg2 = null >>> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rg3 = undefined >>> null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rg4 = undefined >>> undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var rh1 = null & null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rh2 = null & undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rh3 = undefined & null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rh4 = undefined & undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var ri1 = null ^ null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ri2 = null ^ undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ri3 = undefined ^ null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var ri4 = undefined ^ undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var rj1 = null | null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rj2 = null | undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rj3 = undefined | null; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var rj4 = undefined | undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt index afc7a7ee39..2b03d7bf59 100644 --- a/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithTypeParameter.errors.txt @@ -9,482 +9,482 @@ var r1a1 = a * t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a2 = a / t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = a % t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a4 = a - t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a5 = a << t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a6 = a >> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a7 = a >>> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a8 = a & t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a9 = a ^ t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a10 = a | t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a1 = t * a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a2 = t / a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = t % a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a4 = t - a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a5 = t << a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a6 = t >> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a7 = t >>> a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a8 = t & a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a9 = t ^ a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a10 = t | a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = b * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = b % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b4 = b - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b5 = b << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b6 = b >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b7 = b >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b8 = b & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b9 = b ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b10 = b | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = t * b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = t / b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = t % b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b4 = t - b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b5 = t << b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b6 = t >> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b7 = t >>> b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b8 = t & b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b9 = t ^ b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b10 = t | b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = c * t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c2 = c / t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = c % t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c4 = c - t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c5 = c << t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c6 = c >> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c7 = c >>> t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c8 = c & t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c9 = c ^ t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c10 = c | t; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = t * c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c2 = t / c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = t % c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c4 = t - c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c5 = t << c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c6 = t >> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c7 = t >>> c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c8 = t & c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c9 = t ^ c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c10 = t | c; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = d * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = d / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = d % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d4 = d - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d5 = d << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d6 = d >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d7 = d >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d8 = d & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d9 = d ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d10 = d | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = t * d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = t / d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = t % d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d4 = t - d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d5 = t << d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d6 = t >> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d7 = t >>> d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d8 = t & d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d9 = t ^ d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d10 = t | d; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e1 = e * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e2 = e / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e3 = e % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e4 = e - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e5 = e << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e6 = e >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e7 = e >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e8 = e & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e9 = e ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1e10 = e | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e1 = t * e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e2 = t / e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e3 = t % e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e4 = t - e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e5 = t << e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e6 = t >> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e7 = t >>> e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e8 = t & e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e9 = t ^ e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2e10 = t | e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f1 = t * t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f2 = t / t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f3 = t % t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f4 = t - t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f5 = t << t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f6 = t >> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f7 = t >>> t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f8 = t & t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f9 = t ^ t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1f10 = t | t; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. } \ No newline at end of file diff --git a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt index 9552e5400d..86f188be6f 100644 --- a/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt +++ b/tests/baselines/reference/arithmeticOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -9,649 +9,649 @@ // operator * var r1a1 = undefined * a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a2 = undefined * b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1a3 = undefined * c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b1 = a * undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b2 = b * undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1b3 = c * undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c1 = undefined * true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c2 = undefined * ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1c3 = undefined * {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d1 = true * undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d2 = '' * undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r1d3 = {} * undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator / var r2a1 = undefined / a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a2 = undefined / b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2a3 = undefined / c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b1 = a / undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b2 = b / undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2b3 = c / undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c1 = undefined / true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c2 = undefined / ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2c3 = undefined / {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d1 = true / undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d2 = '' / undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r2d3 = {} / undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator % var r3a1 = undefined % a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a2 = undefined % b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3a3 = undefined % c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b1 = a % undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b2 = b % undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3b3 = c % undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c1 = undefined % true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c2 = undefined % ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3c3 = undefined % {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d1 = true % undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d2 = '' % undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r3d3 = {} % undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator - var r4a1 = undefined - a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a2 = undefined - b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4a3 = undefined - c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b1 = a - undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b2 = b - undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4b3 = c - undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c1 = undefined - true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c2 = undefined - ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4c3 = undefined - {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d1 = true - undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d2 = '' - undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r4d3 = {} - undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator << var r5a1 = undefined << a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a2 = undefined << b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5a3 = undefined << c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b1 = a << undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b2 = b << undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5b3 = c << undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c1 = undefined << true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c2 = undefined << ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5c3 = undefined << {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d1 = true << undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d2 = '' << undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r5d3 = {} << undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >> var r6a1 = undefined >> a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a2 = undefined >> b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6a3 = undefined >> c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b1 = a >> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b2 = b >> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6b3 = c >> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c1 = undefined >> true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c2 = undefined >> ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6c3 = undefined >> {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d1 = true >> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d2 = '' >> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r6d3 = {} >> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator >>> var r7a1 = undefined >>> a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a2 = undefined >>> b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7a3 = undefined >>> c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b1 = a >>> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b2 = b >>> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7b3 = c >>> undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c1 = undefined >>> true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c2 = undefined >>> ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7c3 = undefined >>> {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d1 = true >>> undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d2 = '' >>> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r7d3 = {} >>> undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator & var r8a1 = undefined & a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a2 = undefined & b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8a3 = undefined & c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b1 = a & undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b2 = b & undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8b3 = c & undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c1 = undefined & true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c2 = undefined & ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8c3 = undefined & {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d1 = true & undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d2 = '' & undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r8d3 = {} & undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator ^ var r9a1 = undefined ^ a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a2 = undefined ^ b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9a3 = undefined ^ c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b1 = a ^ undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b2 = b ^ undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9b3 = c ^ undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c1 = undefined ^ true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c2 = undefined ^ ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9c3 = undefined ^ {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d1 = true ^ undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d2 = '' ^ undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r9d3 = {} ^ undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // operator | var r10a1 = undefined | a; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a2 = undefined | b; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10a3 = undefined | c; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b1 = a | undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b2 = b | undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10b3 = c | undefined; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c1 = undefined | true; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c2 = undefined | ''; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10c3 = undefined | {}; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d1 = true | undefined; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d2 = '' | undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var r10d3 = {} | undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest1.errors.txt b/tests/baselines/reference/arrayAssignmentTest1.errors.txt index e14bacb3cb..ecd7cd88e7 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest1.errors.txt @@ -46,20 +46,20 @@ var i1_error: I1 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'I1': -!!! Property 'IM1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'I1': +!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'. var c1_error: C1 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'C1': -!!! Property 'IM1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'C1': +!!! error TS2322: Property 'IM1' is missing in type 'undefined[]'. var c2_error: C2 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'undefined[]'. var c3_error: C3 = []; // should be an error - is ~~~~~~~~ -!!! Type 'undefined[]' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'undefined[]'. +!!! error TS2322: Type 'undefined[]' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'undefined[]'. arr_any = arr_i1; // should be ok - is @@ -72,81 +72,81 @@ arr_i1 = arr_c2; // should be ok - subtype relationship - is arr_i1 = arr_c3; // should be an error - is ~~~~~~ -!!! Type 'C3[]' is not assignable to type 'I1[]': -!!! Type 'C3' is not assignable to type 'I1': -!!! Property 'IM1' is missing in type 'C3'. +!!! error TS2322: Type 'C3[]' is not assignable to type 'I1[]': +!!! error TS2322: Type 'C3' is not assignable to type 'I1': +!!! error TS2322: Property 'IM1' is missing in type 'C3'. arr_c1 = arr_c1; // should be ok - subtype relationship - is arr_c1 = arr_c2; // should be ok - subtype relationship - is arr_c1 = arr_i1; // should be an error - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C1[]': -!!! Type 'I1' is not assignable to type 'C1': -!!! Property 'C1M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C1[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C1': +!!! error TS2322: Property 'C1M1' is missing in type 'I1'. arr_c1 = arr_c3; // should be an error - is ~~~~~~ -!!! Type 'C3[]' is not assignable to type 'C1[]': -!!! Type 'C3' is not assignable to type 'C1': -!!! Property 'IM1' is missing in type 'C3'. +!!! error TS2322: Type 'C3[]' is not assignable to type 'C1[]': +!!! error TS2322: Type 'C3' is not assignable to type 'C1': +!!! error TS2322: Property 'IM1' is missing in type 'C3'. arr_c2 = arr_c2; // should be ok - subtype relationship - is arr_c2 = arr_c1; // should be an error - subtype relationship - is ~~~~~~ -!!! Type 'C1[]' is not assignable to type 'C2[]': -!!! Type 'C1' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'C1'. +!!! error TS2322: Type 'C1[]' is not assignable to type 'C2[]': +!!! error TS2322: Type 'C1' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'C1'. arr_c2 = arr_i1; // should be an error - subtype relationship - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C2[]': -!!! Type 'I1' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'I1'. arr_c2 = arr_c3; // should be an error - is ~~~~~~ -!!! Type 'C3[]' is not assignable to type 'C2[]': -!!! Type 'C3' is not assignable to type 'C2': -!!! Property 'C2M1' is missing in type 'C3'. +!!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]': +!!! error TS2322: Type 'C3' is not assignable to type 'C2': +!!! error TS2322: Property 'C2M1' is missing in type 'C3'. // "clean up bug" occurs at this point // if you move these three expressions to another file, they raise an error // something to do with state from the above propagating forward? arr_c3 = arr_c2_2; // should be an error - is ~~~~~~ -!!! Type 'C2[]' is not assignable to type 'C3[]': -!!! Type 'C2' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C2'. +!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C2' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C2'. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! Type 'C1[]' is not assignable to type 'C3[]': -!!! Type 'C1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C1'. +!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C1'. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C3[]': -!!! Type 'I1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'I1'. arr_any = f1; // should be an error - is ~~~~~~~ -!!! Type '() => C1' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => C1'. +!!! error TS2322: Type '() => C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => C1'. arr_any = o1; // should be an error - is ~~~~~~~ -!!! Type '{ one: number; }' is not assignable to type 'any[]': -!!! Property 'length' is missing in type '{ one: number; }'. +!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type '{ one: number; }'. arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is ~~~~~~~ -!!! Type 'C1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C1'. +!!! error TS2322: Type 'C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C1'. arr_any = c2; // should be an error - is ~~~~~~~ -!!! Type 'C2' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C2'. +!!! error TS2322: Type 'C2' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C2'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! Type 'C3' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C3'. +!!! error TS2322: Type 'C3' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C3'. arr_any = i1; // should be an error - is ~~~~~~~ -!!! Type 'I1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'I1'. \ No newline at end of file +!!! error TS2322: Type 'I1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'I1'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest2.errors.txt b/tests/baselines/reference/arrayAssignmentTest2.errors.txt index 5ecebfe392..965480126b 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest2.errors.txt @@ -47,47 +47,47 @@ // "clean up error" occurs at this point arr_c3 = arr_c2_2; // should be an error - is ~~~~~~ -!!! Type 'C2[]' is not assignable to type 'C3[]': -!!! Type 'C2' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C2'. +!!! error TS2322: Type 'C2[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C2' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C2'. arr_c3 = arr_c1_2; // should be an error - is ~~~~~~ -!!! Type 'C1[]' is not assignable to type 'C3[]': -!!! Type 'C1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'C1'. +!!! error TS2322: Type 'C1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'C1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'C1'. arr_c3 = arr_i1_2; // should be an error - is ~~~~~~ -!!! Type 'I1[]' is not assignable to type 'C3[]': -!!! Type 'I1' is not assignable to type 'C3': -!!! Property 'CM3M1' is missing in type 'I1'. +!!! error TS2322: Type 'I1[]' is not assignable to type 'C3[]': +!!! error TS2322: Type 'I1' is not assignable to type 'C3': +!!! error TS2322: Property 'CM3M1' is missing in type 'I1'. arr_any = f1; // should be an error - is ~~~~~~~ -!!! Type '() => C1' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => C1'. +!!! error TS2322: Type '() => C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => C1'. arr_any = function () { return null;} // should be an error - is ~~~~~~~ -!!! Type '() => any' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => any'. +!!! error TS2322: Type '() => any' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => any'. arr_any = o1; // should be an error - is ~~~~~~~ -!!! Type '{ one: number; }' is not assignable to type 'any[]': -!!! Property 'length' is missing in type '{ one: number; }'. +!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type '{ one: number; }'. arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is ~~~~~~~ -!!! Type 'C1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C1'. +!!! error TS2322: Type 'C1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C1'. arr_any = c2; // should be an error - is ~~~~~~~ -!!! Type 'C2' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C2'. +!!! error TS2322: Type 'C2' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C2'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! Type 'C3' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C3'. +!!! error TS2322: Type 'C3' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C3'. arr_any = i1; // should be an error - is ~~~~~~~ -!!! Type 'I1' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'I1'. +!!! error TS2322: Type 'I1' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'I1'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest3.errors.txt b/tests/baselines/reference/arrayAssignmentTest3.errors.txt index 4214ae5ef8..abbd4a23b8 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest3.errors.txt @@ -12,6 +12,6 @@ var xx = new a(null, 7, new B()); ~~~~~~~ -!!! Argument of type 'B' is not assignable to parameter of type 'B[]'. +!!! error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest4.errors.txt b/tests/baselines/reference/arrayAssignmentTest4.errors.txt index 210e18dfe8..b0949315f2 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest4.errors.txt @@ -24,10 +24,10 @@ arr_any = function () { return null;} // should be an error - is ~~~~~~~ -!!! Type '() => any' is not assignable to type 'any[]': -!!! Property 'push' is missing in type '() => any'. +!!! error TS2322: Type '() => any' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type '() => any'. arr_any = c3; // should be an error - is ~~~~~~~ -!!! Type 'C3' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'C3'. +!!! error TS2322: Type 'C3' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'C3'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayAssignmentTest5.errors.txt b/tests/baselines/reference/arrayAssignmentTest5.errors.txt index 9c63282d89..9860295c30 100644 --- a/tests/baselines/reference/arrayAssignmentTest5.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest5.errors.txt @@ -23,9 +23,9 @@ var lineTokens:ILineTokens= this.tokenize(line, state, true); var tokens:IStateToken[]= lineTokens.tokens; ~~~~~~ -!!! Type 'IToken[]' is not assignable to type 'IStateToken[]': -!!! Type 'IToken' is not assignable to type 'IStateToken': -!!! Property 'state' is missing in type 'IToken'. +!!! error TS2322: Type 'IToken[]' is not assignable to type 'IStateToken[]': +!!! error TS2322: Type 'IToken' is not assignable to type 'IStateToken': +!!! error TS2322: Property 'state' is missing in type 'IToken'. if (tokens.length === 0) { return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset) } diff --git a/tests/baselines/reference/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index 509ee2110b..5308711bbb 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -3,9 +3,9 @@ // has type { foo: string }[], which is not assignable to { id: number }[]. <{ id: number; }[]>[{ foo: "s" }]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: -!!! Type '{ foo: string; }' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type '{ foo: string; }'. +!!! error TS2353: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other: +!!! error TS2353: Type '{ foo: string; }' is not assignable to type '{ id: number; }': +!!! error TS2353: Property 'id' is missing in type '{ foo: string; }'. // Should succeed, as the {} element causes the type of the array to be {}[] <{ id: number; }[]>[{ foo: "s" }, {}]; \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt index 59137e1c4c..b2fda2c306 100644 --- a/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt +++ b/tests/baselines/reference/arrayLiteralAndArrayConstructorEquivalence1.errors.txt @@ -3,7 +3,7 @@ var myCars3 = new Array({}); var myCars4: Array; // error ~~~~~ -!!! Generic type 'Array' requires 1 type argument(s). +!!! error TS2314: Generic type 'Array' requires 1 type argument(s). var myCars5: Array[]; myCars = myCars3; diff --git a/tests/baselines/reference/arrayLiteralContextualType.errors.txt b/tests/baselines/reference/arrayLiteralContextualType.errors.txt index e653cfc303..d476b61356 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.errors.txt +++ b/tests/baselines/reference/arrayLiteralContextualType.errors.txt @@ -28,8 +28,8 @@ var arr = [new Giraffe(), new Elephant()]; foo(arr); // Error because of no contextual type ~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'IAnimal[]'. -!!! Type '{}' is not assignable to type 'IAnimal'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'IAnimal[]'. +!!! error TS2345: Type '{}' is not assignable to type 'IAnimal'. bar(arr); // Error because of no contextual type ~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type '{ [x: number]: IAnimal; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ [x: number]: IAnimal; }'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt index 6cffd03f44..0e2a232d3f 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.errors.txt @@ -2,5 +2,5 @@ class X { public f(a: Array) { } ~~~~~ -!!! Generic type 'Array' requires 1 type argument(s). +!!! error TS2314: Generic type 'Array' requires 1 type argument(s). } \ No newline at end of file diff --git a/tests/baselines/reference/arraySigChecking.errors.txt b/tests/baselines/reference/arraySigChecking.errors.txt index 3cb48f7a4e..8c1b89ffdb 100644 --- a/tests/baselines/reference/arraySigChecking.errors.txt +++ b/tests/baselines/reference/arraySigChecking.errors.txt @@ -11,7 +11,7 @@ var foo: { [index: any]; }; // expect an error here ~~~~~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. } interface myInt { @@ -20,17 +20,17 @@ var myVar: myInt; var strArray: string[] = [myVar.voidFn()]; ~~~~~~~~ -!!! Type 'void[]' is not assignable to type 'string[]': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'void[]' is not assignable to type 'string[]': +!!! error TS2322: Type 'void' is not assignable to type 'string'. var myArray: number[][][]; myArray = [[1, 2]]; ~~~~~~~ -!!! Type 'number[][]' is not assignable to type 'number[][][]': -!!! Type 'number[]' is not assignable to type 'number[][]': -!!! Type 'number' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'number[][]' is not assignable to type 'number[][][]': +!!! error TS2322: Type 'number[]' is not assignable to type 'number[][]': +!!! error TS2322: Type 'number' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. function isEmpty(l: { length: number }) { return l.length === 0; diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt b/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt index 58b4345bc0..d312c79502 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes.errors.txt @@ -11,11 +11,11 @@ var r4 = r3(); var r4b = new r3(); // error ~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var x3: Array<() => string>; var r5 = x2[1]; var r6 = r5(); var r6b = new r5(); // error ~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. \ No newline at end of file +!!! error TS2350: Only a void function can be called with the 'new' keyword. \ No newline at end of file diff --git a/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt b/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt index fc8cd992cf..95d25da059 100644 --- a/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt +++ b/tests/baselines/reference/arrayTypeOfFunctionTypes2.errors.txt @@ -16,4 +16,4 @@ var r6 = new r5(); var r6b = r5(); ~~~~ -!!! Value of type 'new () => string' is not callable. Did you mean to include 'new'? \ No newline at end of file +!!! error TS2348: Value of type 'new () => string' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt index cb877f5e57..4c0a939bf4 100644 --- a/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt +++ b/tests/baselines/reference/arrayTypeOfTypeOf.errors.txt @@ -6,16 +6,16 @@ var xs2: typeof Array; var xs3: typeof Array; ~ -!!! '=' expected. +!!! error TS1005: '=' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~ -!!! Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }': -!!! Property 'isArray' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }': +!!! error TS2322: Property 'isArray' is missing in type 'Number'. var xs4: typeof Array; ~ -!!! '=' expected. +!!! error TS1005: '=' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~ -!!! Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'. \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionContexts.errors.txt b/tests/baselines/reference/arrowFunctionContexts.errors.txt index 9a1e3cdb61..aaebd993e9 100644 --- a/tests/baselines/reference/arrowFunctionContexts.errors.txt +++ b/tests/baselines/reference/arrowFunctionContexts.errors.txt @@ -3,9 +3,9 @@ // Arrow function used in with statement with (window) { ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. ~~~~~~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. var p = () => this; } @@ -23,7 +23,7 @@ // Arrow function as function argument window.setTimeout(() => null, 100); ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. // Arrow function as value in array literal @@ -37,10 +37,10 @@ enum E { x = () => 4, // Error expected ~~~~~~~ -!!! Type '() => number' is not assignable to type 'E'. +!!! error TS2323: Type '() => number' is not assignable to type 'E'. y = (() => this).length // error, can't use this in enum ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } // Arrow function as module variable initializer @@ -54,9 +54,9 @@ // Arrow function used in with statement with (window) { ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. ~~~~~~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. var p = () => this; } @@ -74,7 +74,7 @@ // Arrow function as function argument window.setTimeout(() => null, 100); ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. // Arrow function as value in array literal @@ -88,10 +88,10 @@ enum E { x = () => 4, // Error expected ~~~~~~~ -!!! Type '() => number' is not assignable to type 'E'. +!!! error TS2323: Type '() => number' is not assignable to type 'E'. y = (() => this).length ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } // Arrow function as module variable initializer diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt b/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt index e5f33b3e1e..484faf1d77 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.errors.txt @@ -4,5 +4,5 @@ } var c = new C(() => { return asdf; } ) // should error ~~~~ -!!! Cannot find name 'asdf'. +!!! error TS2304: Cannot find name 'asdf'. \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt index a0cf2c0051..c2752501be 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.errors.txt @@ -2,6 +2,6 @@ // Should error at semicolon. var f = () => ; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var b = 1 * 2 * 3 * 4; var square = (x: number) => x * x; \ No newline at end of file diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt b/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt index 69b94cd7d4..eee053892f 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.errors.txt @@ -3,103 +3,103 @@ module missingArrowsWithCurly { var a = () { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var b = (): void { } ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var c = (x) { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var d = (x: number, y: string) { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var e = (x: number, y: string): void { }; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } module missingCurliesWithArrow { module withStatement { var a = () => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var b = (): void => var k = 10;} ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var c = (x) => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var d = (x: number, y: string) => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var e = (x: number, y: string): void => var k = 10;}; ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. var f = () => var k = 10;} ~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. } module withoutStatement { var a = () => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var b = (): void => } ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var c = (x) => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var d = (x: number, y: string) => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var e = (x: number, y: string): void => }; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var f = () => } ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. module ce_nEst_pas_une_arrow_function { var a = (); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. var b = (): void; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var c = (x); ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. var d = (x: number, y: string); ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var e = (x: number, y: string): void; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } module okay { diff --git a/tests/baselines/reference/asiReturn.errors.txt b/tests/baselines/reference/asiReturn.errors.txt index 7b7b44655c..7dbfb35172 100644 --- a/tests/baselines/reference/asiReturn.errors.txt +++ b/tests/baselines/reference/asiReturn.errors.txt @@ -2,4 +2,4 @@ // This should be an error for using a return outside a function, but ASI should work properly return ~~~~~~ -!!! A 'return' statement can only be used within a function body. \ No newline at end of file +!!! error TS1108: A 'return' statement can only be used within a function body. \ No newline at end of file diff --git a/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt b/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt index 007b23dc47..07f29771e2 100644 --- a/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt +++ b/tests/baselines/reference/assertInWrapSomeTypeParameter.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/assertInWrapSomeTypeParameter.ts (2 errors) ==== class C> { ~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo>(x: U) { ~ -!!! '>' expected. +!!! error TS1005: '>' expected. return null; } } \ No newline at end of file diff --git a/tests/baselines/reference/assignAnyToEveryType.errors.txt b/tests/baselines/reference/assignAnyToEveryType.errors.txt index a6eadd1203..7b60836834 100644 --- a/tests/baselines/reference/assignAnyToEveryType.errors.txt +++ b/tests/baselines/reference/assignAnyToEveryType.errors.txt @@ -41,7 +41,7 @@ M = x; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function k(a: T) { a = x; diff --git a/tests/baselines/reference/assignFromBooleanInterface.errors.txt b/tests/baselines/reference/assignFromBooleanInterface.errors.txt index 679399d453..fc9c56e0b7 100644 --- a/tests/baselines/reference/assignFromBooleanInterface.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface.errors.txt @@ -3,5 +3,5 @@ var a: Boolean; x = a; ~ -!!! Type 'Boolean' is not assignable to type 'boolean'. +!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'. a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt index fc1350681f..8aee057125 100644 --- a/tests/baselines/reference/assignFromBooleanInterface2.errors.txt +++ b/tests/baselines/reference/assignFromBooleanInterface2.errors.txt @@ -19,9 +19,9 @@ x = a; // expected error ~ -!!! Type 'Boolean' is not assignable to type 'boolean'. +!!! error TS2323: Type 'Boolean' is not assignable to type 'boolean'. x = b; // expected error ~ -!!! Type 'NotBoolean' is not assignable to type 'boolean'. +!!! error TS2323: Type 'NotBoolean' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface.errors.txt b/tests/baselines/reference/assignFromNumberInterface.errors.txt index 845b8cb5b7..3634c15fba 100644 --- a/tests/baselines/reference/assignFromNumberInterface.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface.errors.txt @@ -3,5 +3,5 @@ var a: Number; x = a; ~ -!!! Type 'Number' is not assignable to type 'number'. +!!! error TS2323: Type 'Number' is not assignable to type 'number'. a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromNumberInterface2.errors.txt b/tests/baselines/reference/assignFromNumberInterface2.errors.txt index 331232f6ce..ba43641934 100644 --- a/tests/baselines/reference/assignFromNumberInterface2.errors.txt +++ b/tests/baselines/reference/assignFromNumberInterface2.errors.txt @@ -23,9 +23,9 @@ x = a; // expected error ~ -!!! Type 'Number' is not assignable to type 'number'. +!!! error TS2323: Type 'Number' is not assignable to type 'number'. x = b; // expected error ~ -!!! Type 'NotNumber' is not assignable to type 'number'. +!!! error TS2323: Type 'NotNumber' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface.errors.txt b/tests/baselines/reference/assignFromStringInterface.errors.txt index ba8c5fd583..42eb4fee41 100644 --- a/tests/baselines/reference/assignFromStringInterface.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface.errors.txt @@ -3,5 +3,5 @@ var a: String; x = a; ~ -!!! Type 'String' is not assignable to type 'string'. +!!! error TS2323: Type 'String' is not assignable to type 'string'. a = x; \ No newline at end of file diff --git a/tests/baselines/reference/assignFromStringInterface2.errors.txt b/tests/baselines/reference/assignFromStringInterface2.errors.txt index 6a8f5e5f6f..9f87b3c91c 100644 --- a/tests/baselines/reference/assignFromStringInterface2.errors.txt +++ b/tests/baselines/reference/assignFromStringInterface2.errors.txt @@ -46,9 +46,9 @@ x = a; // expected error ~ -!!! Type 'String' is not assignable to type 'string'. +!!! error TS2323: Type 'String' is not assignable to type 'string'. x = b; // expected error ~ -!!! Type 'NotString' is not assignable to type 'string'. +!!! error TS2323: Type 'NotString' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt index 78c710a7d5..1e7250e3c9 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt @@ -7,10 +7,10 @@ fn((a, b) => true); ~~~~~~~~~~~~~~ -!!! Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -!!! Property 'x' is missing in type '(a: any, b: any) => boolean'. +!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. +!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean'. fn(function (a, b) { return true; }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. -!!! Property 'x' is missing in type '(a: any, b: any) => boolean'. +!!! error TS2345: Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. +!!! error TS2345: Property 'x' is missing in type '(a: any, b: any) => boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignToEnum.errors.txt b/tests/baselines/reference/assignToEnum.errors.txt index bc37cc5496..30251672d6 100644 --- a/tests/baselines/reference/assignToEnum.errors.txt +++ b/tests/baselines/reference/assignToEnum.errors.txt @@ -2,15 +2,15 @@ enum A { foo, bar } A = undefined; // invalid LHS ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. A = A.bar; // invalid LHS ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. A.foo = 1; // invalid LHS ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. A.foo = A.bar; // invalid LHS ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignToExistingClass.errors.txt b/tests/baselines/reference/assignToExistingClass.errors.txt index 49feb0a76a..b649f17625 100644 --- a/tests/baselines/reference/assignToExistingClass.errors.txt +++ b/tests/baselines/reference/assignToExistingClass.errors.txt @@ -8,7 +8,7 @@ willThrowError() { Mocked = Mocked || function () { // => Error: Invalid left-hand side of assignment expression. ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. return { myProp: "test" }; }; } diff --git a/tests/baselines/reference/assignToFn.errors.txt b/tests/baselines/reference/assignToFn.errors.txt index 10af594642..0526623460 100644 --- a/tests/baselines/reference/assignToFn.errors.txt +++ b/tests/baselines/reference/assignToFn.errors.txt @@ -8,6 +8,6 @@ x.f="hello"; ~~~ -!!! Type 'string' is not assignable to type '(n: number) => boolean'. +!!! error TS2323: Type 'string' is not assignable to type '(n: number) => boolean'. } \ No newline at end of file diff --git a/tests/baselines/reference/assignToInvalidLHS.errors.txt b/tests/baselines/reference/assignToInvalidLHS.errors.txt index dd183cf639..d7c24b86ae 100644 --- a/tests/baselines/reference/assignToInvalidLHS.errors.txt +++ b/tests/baselines/reference/assignToInvalidLHS.errors.txt @@ -4,4 +4,4 @@ // Below is actually valid JavaScript (see http://es5.github.com/#x8.7 ), even though will always fail at runtime with 'invalid left-hand side' var x = new y = 5; ~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignToModule.errors.txt b/tests/baselines/reference/assignToModule.errors.txt index ba284a32fa..da9b3c5c15 100644 --- a/tests/baselines/reference/assignToModule.errors.txt +++ b/tests/baselines/reference/assignToModule.errors.txt @@ -2,4 +2,4 @@ module A {} A = undefined; // invalid LHS ~ -!!! Cannot find name 'A'. \ No newline at end of file +!!! error TS2304: Cannot find name 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompat1.errors.txt b/tests/baselines/reference/assignmentCompat1.errors.txt index 540bb044f6..29367cb25b 100644 --- a/tests/baselines/reference/assignmentCompat1.errors.txt +++ b/tests/baselines/reference/assignmentCompat1.errors.txt @@ -4,9 +4,9 @@ x = y; ~ -!!! Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }': -!!! Property 'one' is missing in type '{ [x: string]: any; }'. +!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }': +!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'. y = x; ~ -!!! Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }': -!!! Index signature is missing in type '{ one: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }': +!!! error TS2322: Index signature is missing in type '{ one: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatBug2.errors.txt b/tests/baselines/reference/assignmentCompatBug2.errors.txt index ddbc170693..c108dd0e0e 100644 --- a/tests/baselines/reference/assignmentCompatBug2.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug2.errors.txt @@ -1,13 +1,13 @@ ==== tests/cases/compiler/assignmentCompatBug2.ts (5 errors) ==== var b2: { b: number;} = { a: 0 }; // error ~~ -!!! Type '{ a: number; }' is not assignable to type '{ b: number; }': -!!! Property 'b' is missing in type '{ a: number; }'. +!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': +!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. b2 = { a: 0 }; // error ~~ -!!! Type '{ a: number; }' is not assignable to type '{ b: number; }': -!!! Property 'b' is missing in type '{ a: number; }'. +!!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }': +!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. b2 = {b: 0, a: 0 }; @@ -21,16 +21,16 @@ b3 = { ~~ -!!! Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': -!!! Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. +!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': +!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. f: (n) => { return 0; }, g: (s) => { return 0; }, }; // error b3 = { ~~ -!!! Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': -!!! Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'. +!!! error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': +!!! error TS2322: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'. f: (n) => { return 0; }, m: 0, }; // error @@ -45,8 +45,8 @@ b3 = { ~~ -!!! Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': -!!! Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'. +!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }': +!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'. f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, diff --git a/tests/baselines/reference/assignmentCompatBug3.errors.txt b/tests/baselines/reference/assignmentCompatBug3.errors.txt index f2cb650567..4443443500 100644 --- a/tests/baselines/reference/assignmentCompatBug3.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug3.errors.txt @@ -3,10 +3,10 @@ return { get x() { return x;}, // shouldn't be "void" ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. get y() { return y;}, // shouldn't be "void" ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. //x: "yo", //y: "boo", dist: function () { @@ -18,7 +18,7 @@ class C { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; } } diff --git a/tests/baselines/reference/assignmentCompatBug5.errors.txt b/tests/baselines/reference/assignmentCompatBug5.errors.txt index cd8f24cee3..972b20670a 100644 --- a/tests/baselines/reference/assignmentCompatBug5.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug5.errors.txt @@ -2,21 +2,21 @@ function foo1(x: { a: number; }) { } foo1({ b: 5 }); ~~~~~~~~ -!!! Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. -!!! Property 'a' is missing in type '{ b: number; }'. +!!! error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. +!!! error TS2345: Property 'a' is missing in type '{ b: number; }'. function foo2(x: number[]) { } foo2(["s", "t"]); ~~~~~~~~~~ -!!! Argument of type 'string[]' is not assignable to parameter of type 'number[]'. -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'number[]'. +!!! error TS2345: Type 'string' is not assignable to type 'number'. function foo3(x: (n: number) =>number) { }; foo3((s:string) => { }); ~~~~~~~~~~~~~~~~~ -!!! Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. +!!! error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. foo3((n) => { return; }); ~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. +!!! error TS2345: Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt index fda1cca3d8..55226d6b48 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt @@ -1,15 +1,15 @@ ==== tests/cases/compiler/assignmentCompatFunctionsWithOptionalArgs.ts (3 errors) ==== function foo(x: { id: number; name?: string; }): void; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. foo({ id: 1234 }); // Ok foo({ id: 1234, name: "hello" }); // Ok foo({ id: 1234, name: false }); // Error, name of wrong type ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. -!!! Types of property 'name' are incompatible: -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. +!!! error TS2345: Types of property 'name' are incompatible: +!!! error TS2345: Type 'boolean' is not assignable to type 'string'. foo({ name: "hello" }); // Error, id required but missing ~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. -!!! Property 'id' is missing in type '{ name: string; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. +!!! error TS2345: Property 'id' is missing in type '{ name: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt index 7d84f69b3d..fc1a3554ca 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt @@ -15,5 +15,5 @@ Biz(new Foo()); ~~~~~~~~~ -!!! Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. +!!! error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt index ab314d0a95..8bc6565e39 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.errors.txt @@ -35,42 +35,42 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = a3; ~ -!!! Type '(x: string) => void' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = s2; ~ -!!! Type 'S2' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = a3; ~ -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt index 2fa4e383e9..eca5f3ee41 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.errors.txt @@ -31,20 +31,20 @@ // errors t = () => 1; ~ -!!! Type '() => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '() => number'. t = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. a = () => 1; ~ -!!! Type '() => number' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '() => number'. a = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. interface S2 { f(x: string): void; @@ -54,46 +54,46 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. a = s2; ~ -!!! Type 'S2' is not assignable to type '{ f(x: number): void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'S2' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f(x: number): void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt index 973dfe92ca..448741cf61 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures4.errors.txt @@ -52,22 +52,22 @@ var b8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, { foo: number } and Base are incompatible ~~ -!!! Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error, { foo: number } and Base are incompatible ~~ -!!! Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type 'Base' is not assignable to type '{ foo: number; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var b10: (...x: T[]) => T; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt index 125def7dc6..777586e302 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.errors.txt @@ -16,19 +16,19 @@ a = (x?: number) => 1; // ok, same number of required params a = (x: number) => 1; // error, too many required params ~ -!!! Type '(x: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'. a = b.a; // ok a = b.a2; // ok a = b.a3; // error ~ -!!! Type '(x: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number) => number' is not assignable to type '() => number'. a = b.a4; // error ~ -!!! Type '(x: number, y?: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number, y?: number) => number' is not assignable to type '() => number'. a = b.a5; // ok a = b.a6; // error ~ -!!! Type '(x: number, y: number) => number' is not assignable to type '() => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '() => number'. var a2: (x?: number) => number; a2 = () => 1; // ok, same number of required params @@ -41,7 +41,7 @@ a2 = b.a5; // ok a2 = b.a6; // error ~~ -!!! Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x?: number) => number'. var a3: (x: number) => number; a3 = () => 1; // ok, fewer required params @@ -49,7 +49,7 @@ a3 = (x: number) => 1; // ok, same number of required params a3 = (x: number, y: number) => 1; // error, too many required params ~~ -!!! Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. a3 = b.a; // ok a3 = b.a2; // ok a3 = b.a3; // ok @@ -57,7 +57,7 @@ a3 = b.a5; // ok a3 = b.a6; // error ~~ -!!! Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. +!!! error TS2323: Type '(x: number, y: number) => number' is not assignable to type '(x: number) => number'. var a4: (x: number, y?: number) => number; a4 = () => 1; // ok, fewer required params diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt index 7bee15e16b..b572e276f7 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.errors.txt @@ -13,17 +13,17 @@ a = (...args: number[]) => 1; // ok, same number of required params a = (...args: string[]) => 1; // error, type mismatch ~ -!!! Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number': -!!! Types of parameters 'args' and 'args' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(...args: string[]) => number' is not assignable to type '(...args: number[]) => number': +!!! error TS2322: Types of parameters 'args' and 'args' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a = (x?: number) => 1; // ok, same number of required params a = (x?: number, y?: number, z?: number) => 1; // ok, same number of required params a = (x: number) => 1; // ok, rest param corresponds to infinite number of params a = (x?: string) => 1; // error, incompatible type ~ -!!! Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': -!!! Types of parameters 'x' and 'args' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x?: string) => number' is not assignable to type '(...args: number[]) => number': +!!! error TS2322: Types of parameters 'x' and 'args' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var a2: (x: number, ...z: number[]) => number; @@ -34,9 +34,9 @@ a2 = (x: number, ...args: number[]) => 1; // ok, same number of required params a2 = (x: number, ...args: string[]) => 1; // should be type mismatch error ~~ -!!! Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number': -!!! Types of parameters 'args' and 'z' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x: number, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'args' and 'z' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. a2 = (x: number, y: number) => 1; // ok, rest param corresponds to infinite number of params a2 = (x: number, y?: number) => 1; // ok, same number of required params @@ -47,36 +47,36 @@ a3 = (x: number, y: string) => 1; // ok, all present params match a3 = (x: number, y?: number, z?: number) => 1; // error ~~ -!!! Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number, y?: number, z?: number) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a3 = (x: number, ...z: number[]) => 1; // error ~~ -!!! Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'z' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number, ...z: number[]) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'z' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a3 = (x: string, y?: string, z?: string) => 1; // error ~~ -!!! Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string, y?: string, z?: string) => number' is not assignable to type '(x: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var a4: (x?: number, y?: string, ...z: number[]) => number; a4 = () => 1; // ok, fewer required params a4 = (x?: number, y?: number) => 1; // error, type mismatch ~~ -!!! Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x?: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a4 = (x: number) => 1; // ok, all present params match a4 = (x: number, y?: number) => 1; // error, second param has type mismatch ~~ -!!! Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number, y?: number) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. a4 = (x?: number, y?: string) => 1; // ok, same number of required params with matching types a4 = (x: number, ...args: string[]) => 1; // error, rest params have type mismatch ~~ -!!! Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': -!!! Types of parameters 'args' and 'z' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type '(x: number, ...args: string[]) => number' is not assignable to type '(x?: number, y?: string, ...z: number[]) => number': +!!! error TS2322: Types of parameters 'args' and 'z' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt index 46c7804b14..b8e9e21cdf 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt @@ -28,26 +28,26 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T'. +!!! error TS2323: Type 'S2' is not assignable to type 'T'. t = a3; ~ -!!! Type '(x: string) => void' is not assignable to type 'T'. +!!! error TS2323: Type '(x: string) => void' is not assignable to type 'T'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T'. +!!! error TS2323: Type '(x: string) => number' is not assignable to type 'T'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type 'T'. a = s2; ~ -!!! Type 'S2' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type 'S2' is not assignable to type 'new (x: number) => void'. a = a3; ~ -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. +!!! error TS2323: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index 703bf50d29..0bdb896205 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt @@ -23,20 +23,20 @@ // errors t = () => 1; ~ -!!! Type '() => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '() => number'. t = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. a = () => 1; ~ -!!! Type '() => number' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '() => number'. +!!! error TS2322: Type '() => number' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '() => number'. a = function (x: number) { return ''; } ~ -!!! Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '(x: number) => string'. +!!! error TS2322: Type '(x: number) => string' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '(x: number) => string'. interface S2 { f(x: string): void; @@ -46,38 +46,38 @@ // these are errors t = s2; ~ -!!! Type 'S2' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type 'S2' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. t = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type 'T': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. t = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. t = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type 'T': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type 'T': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. a = s2; ~ -!!! Type 'S2' is not assignable to type '{ f: new (x: number) => void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. a = a3; ~ -!!! Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }': -!!! Types of property 'f' are incompatible: -!!! Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. a = (x: string) => 1; ~ -!!! Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '(x: string) => number'. +!!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => number'. a = function (x: string) { return ''; } ~ -!!! Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }': -!!! Property 'f' is missing in type '(x: string) => string'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }': +!!! error TS2322: Property 'f' is missing in type '(x: string) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index c5055b16e8..d38567ef09 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -52,22 +52,22 @@ var b8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; a8 = b8; // error, type mismatch ~~ -!!! Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. b8 = a8; // error ~~ -!!! Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type 'Base' is not assignable to type '{ foo: number; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var b10: new (...x: T[]) => T; @@ -93,26 +93,26 @@ var b16: new (x: (a: T) => T) => T[]; a16 = b16; // error ~~~ -!!! Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. +!!! error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. b16 = a16; // error ~~~ -!!! Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error ~~~ -!!! Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. +!!! error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. b17 = a17; // error ~~~ -!!! Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. +!!! error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. } module WithGenericSignaturesInBaseType { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt index 69098417e5..2981cd3d5e 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignaturesWithOptionalParameters.errors.txt @@ -16,14 +16,14 @@ a = b.a2; // ok a = b.a3; // error ~ -!!! Type 'new (x: number) => number' is not assignable to type 'new () => number'. +!!! error TS2323: Type 'new (x: number) => number' is not assignable to type 'new () => number'. a = b.a4; // error ~ -!!! Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'. +!!! error TS2323: Type 'new (x: number, y?: number) => number' is not assignable to type 'new () => number'. a = b.a5; // ok a = b.a6; // error ~ -!!! Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. +!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new () => number'. var a2: new (x?: number) => number; a2 = b.a; // ok @@ -33,7 +33,7 @@ a2 = b.a5; // ok a2 = b.a6; // error ~~ -!!! Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. +!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x?: number) => number'. var a3: new (x: number) => number; a3 = b.a; // ok @@ -43,7 +43,7 @@ a3 = b.a5; // ok a3 = b.a6; // error ~~ -!!! Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. +!!! error TS2323: Type 'new (x: number, y: number) => number' is not assignable to type 'new (x: number) => number'. var a4: new (x: number, y?: number) => number; a4 = b.a; // ok diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt index d5fb8f331f..8649e54376 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignatures4.errors.txt @@ -7,10 +7,10 @@ var x: >(z: T) => void ~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var y: >>(z: T) => void ~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. // These both do not make sense as we would eventually be comparing I2 to I2>, and they are self referencing anyway x = y diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt index 5807bbb166..5a35faa1b4 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.errors.txt @@ -14,7 +14,7 @@ this.a = (x?: T) => null; // ok, same T of required params this.a = (x: T) => null; // error, too many required params ~~~~~~ -!!! Type '(x: T) => any' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T) => any' is not assignable to type '() => T'. this.a2 = () => null; // ok, same T of required params this.a2 = (x?: T) => null; // ok, same T of required params @@ -25,7 +25,7 @@ this.a3 = (x: T) => null; // ok, same T of required params this.a3 = (x: T, y: T) => null; // error, too many required params ~~~~~~~ -!!! Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +!!! error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. this.a4 = () => null; // ok, fewer required params this.a4 = (x?: T, y?: T) => null; // ok, fewer required params @@ -69,10 +69,10 @@ b.a = t.a2; b.a = t.a3; ~~~ -!!! Type '(x: T) => T' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T) => T' is not assignable to type '() => T'. b.a = t.a4; ~~~ -!!! Type '(x: T, y?: T) => T' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T, y?: T) => T' is not assignable to type '() => T'. b.a = t.a5; b.a2 = t.a; @@ -115,7 +115,7 @@ this.a = (x?: T) => null; // ok, same T of required params this.a = (x: T) => null; // error, too many required params ~~~~~~ -!!! Type '(x: T) => any' is not assignable to type '() => T'. +!!! error TS2323: Type '(x: T) => any' is not assignable to type '() => T'. this.a2 = () => null; // ok, same T of required params this.a2 = (x?: T) => null; // ok, same T of required params @@ -126,7 +126,7 @@ this.a3 = (x: T) => null; // ok, same T of required params this.a3 = (x: T, y: T) => null; // error, too many required params ~~~~~~~ -!!! Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. +!!! error TS2323: Type '(x: T, y: T) => any' is not assignable to type '(x: T) => T'. this.a4 = () => null; // ok, fewer required params this.a4 = (x?: T, y?: T) => null; // ok, fewer required params diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt index 0974c579da..92fb3ac32d 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer.errors.txt @@ -14,19 +14,19 @@ a = b; b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { class A { @@ -42,28 +42,28 @@ var b: { [x: number]: Derived; } a = b; // error ~ -!!! Type '{ [x: number]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! Type '{ [x: number]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. var b3: { [x: number]: T; } a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt index 35a0cf283a..06d182750f 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer2.errors.txt @@ -14,19 +14,19 @@ a = b; b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { interface A { @@ -42,28 +42,28 @@ var b: { [x: number]: Derived; } a = b; // error ~ -!!! Type '{ [x: number]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: number]: Derived2; } a = b2; // error ~ -!!! Type '{ [x: number]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. var b3: { [x: number]: T; } a = b3; // ok diff --git a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt index dfc4632375..0e98092928 100644 --- a/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithNumericIndexer3.errors.txt @@ -14,10 +14,10 @@ a = b; // error ~ -!!! Type '{ [x: number]: Base; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type '{ [x: number]: Base; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. b = a; // ok class B2 extends A { @@ -28,10 +28,10 @@ a = b2; // ok b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: number]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. module Generics { class A { @@ -43,9 +43,9 @@ var b: { [x: number]: Derived; }; a = b; // error ~ -!!! Type '{ [x: number]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b = a; // ok var b2: { [x: number]: T; }; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt index 7b0e088f85..cd01ed060d 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.errors.txt @@ -24,91 +24,91 @@ s = t; // error ~ -!!! Type 'T' is not assignable to type 'S': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T' is not assignable to type 'S': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. t = s; // error ~ -!!! Type 'S' is not assignable to type 'T': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type 'S' is not assignable to type 'T': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. s = s2; // ok s = a2; // ok s2 = t2; // error ~~ -!!! Type 'T2' is not assignable to type 'S2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T2' is not assignable to type 'S2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. t2 = s2; // error ~~ -!!! Type 'S2' is not assignable to type 'T2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type 'S2' is not assignable to type 'T2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. s2 = t; // error ~~ -!!! Type 'T' is not assignable to type 'S2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T' is not assignable to type 'S2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. s2 = b; // error ~~ -!!! Type '{ foo: Derived2; }' is not assignable to type 'S2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type 'S2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. s2 = a2; // ok a = b; // error ~ -!!! Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. b = a; // error ~ -!!! Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. a = s; // ok a = s2; // ok a = a2; // ok a2 = b2; // error ~~ -!!! Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. b2 = a2; // error ~~ -!!! Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Derived'. +!!! error TS2322: Type '{ foo: Derived; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Derived'. a2 = b; // error ~~ -!!! Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type '{ foo: Derived2; }' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. a2 = t2; // error ~~ -!!! Type 'T2' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T2' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. a2 = t; // error ~~ -!!! Type 'T' is not assignable to type '{ foo: Derived; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Derived2' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'T' is not assignable to type '{ foo: Derived; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. } module WithBase { @@ -135,20 +135,20 @@ s = t; // ok t = s; // error ~ -!!! Type 'S' is not assignable to type 'T': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'S' is not assignable to type 'T': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. s = s2; // ok s = a2; // ok s2 = t2; // ok t2 = s2; // error ~~ -!!! Type 'S2' is not assignable to type 'T2': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'S2' is not assignable to type 'T2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. s2 = t; // ok s2 = b; // ok s2 = a2; // ok @@ -156,10 +156,10 @@ a = b; // ok b = a; // error ~ -!!! Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. a = s; // ok a = s2; // ok a = a2; // ok @@ -167,10 +167,10 @@ a2 = b2; // ok b2 = a2; // error ~~ -!!! Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': -!!! Types of property 'foo' are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type '{ foo: Base; }' is not assignable to type '{ foo: Derived2; }': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. a2 = b; // ok a2 = t2; // ok a2 = t; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt index d3e92899a8..a5bf974921 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers5.errors.txt @@ -13,9 +13,9 @@ c = i; // error ~ -!!! Type 'I' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'I'. +!!! error TS2322: Type 'I' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'I'. i = c; // error ~ -!!! Type 'C' is not assignable to type 'I': -!!! Property 'fooo' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'I': +!!! error TS2322: Property 'fooo' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt index 75ba383671..566e432502 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersAccessibility.errors.txt @@ -31,49 +31,49 @@ a = d; a = e; // error ~ -!!! Type 'E' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = a; b = i; b = d; b = e; // error ~ -!!! Type 'E' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = a; i = b; i = d; i = e; // error ~ -!!! Type 'E' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. d = a; d = b; d = i; d = e; // error ~ -!!! Type 'E' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = a; // errror ~ -!!! Type '{ foo: string; }' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = b; // errror ~ -!!! Type 'Base' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = i; // errror ~ -!!! Type 'I' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = d; // errror ~ -!!! Type 'D' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = e; } @@ -105,78 +105,78 @@ a = b; // error ~ -!!! Type 'Base' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. a = i; // error ~ -!!! Type 'I' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. a = d; a = e; // error ~ -!!! Type 'E' is not assignable to type '{ foo: string; }': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = a; // error ~ -!!! Type '{ foo: string; }' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = i; b = d; // error ~ -!!! Type 'D' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = e; // error ~ -!!! Type 'E' is not assignable to type 'Base': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'Base': +!!! error TS2322: Private property 'foo' cannot be reimplemented. b = b; i = a; // error ~ -!!! Type '{ foo: string; }' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = b; i = d; // error ~ -!!! Type 'D' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = e; // error ~ -!!! Type 'E' is not assignable to type 'I': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'I': +!!! error TS2322: Private property 'foo' cannot be reimplemented. i = i; d = a; d = b; // error ~ -!!! Type 'Base' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. d = i; // error ~ -!!! Type 'I' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. d = e; // error ~ -!!! Type 'E' is not assignable to type 'D': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'E' is not assignable to type 'D': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = a; // errror ~ -!!! Type '{ foo: string; }' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type '{ foo: string; }' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = b; // errror ~ -!!! Type 'Base' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'Base' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = i; // errror ~ -!!! Type 'I' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'I' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = d; // errror ~ -!!! Type 'D' is not assignable to type 'E': -!!! Private property 'foo' cannot be reimplemented. +!!! error TS2322: Type 'D' is not assignable to type 'E': +!!! error TS2322: Private property 'foo' cannot be reimplemented. e = e; } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt index 1e2b287f94..df1015510b 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.errors.txt @@ -73,34 +73,34 @@ c = d; // error ~ -!!! Type 'D' is not assignable to type 'C': -!!! Required property 'opt' cannot be reimplemented with optional property in 'D'. +!!! error TS2322: Type 'D' is not assignable to type 'C': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'D'. c = e; // error ~ -!!! Type 'E' is not assignable to type 'C': -!!! Required property 'opt' cannot be reimplemented with optional property in 'E'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'E'. c = f; // ok c = a; // ok a = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'D'. a = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'E'. a = f; // ok a = c; // ok b = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'D'. b = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Required property 'opt' cannot be reimplemented with optional property in 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Required property 'opt' cannot be reimplemented with optional property in 'E'. b = f; // ok b = a; // ok b = c; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt index 4d4344a8af..95a0f975d1 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.errors.txt @@ -74,44 +74,44 @@ c = d; // error ~ -!!! Type 'D' is not assignable to type 'C': -!!! Property 'opt' is missing in type 'D'. +!!! error TS2322: Type 'D' is not assignable to type 'C': +!!! error TS2322: Property 'opt' is missing in type 'D'. c = e; // error ~ -!!! Type 'E' is not assignable to type 'C': -!!! Property 'opt' is missing in type 'E'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Property 'opt' is missing in type 'E'. c = f; // error ~ -!!! Type 'F' is not assignable to type 'C': -!!! Property 'opt' is missing in type 'F'. +!!! error TS2322: Type 'F' is not assignable to type 'C': +!!! error TS2322: Property 'opt' is missing in type 'F'. c = a; // ok a = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'D'. a = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'E'. a = f; // error ~ -!!! Type 'F' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'F'. +!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'F'. a = c; // ok b = d; // error ~ -!!! Type 'D' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'D'. +!!! error TS2322: Type 'D' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'D'. b = e; // error ~ -!!! Type 'E' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'E'. +!!! error TS2322: Type 'E' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'E'. b = f; // error ~ -!!! Type 'F' is not assignable to type '{ opt: Base; }': -!!! Property 'opt' is missing in type 'F'. +!!! error TS2322: Type 'F' is not assignable to type '{ opt: Base; }': +!!! error TS2322: Property 'opt' is missing in type 'F'. b = a; // ok b = c; // ok } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index 954fbfe88e..ea6ee177dc 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -21,74 +21,74 @@ s = t; ~ -!!! Type 'T' is not assignable to type 'S': -!!! Property ''1'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type 'S': +!!! error TS2322: Property ''1'' is missing in type 'T'. t = s; ~ -!!! Type 'S' is not assignable to type 'T': -!!! Property ''1.'' is missing in type 'S'. +!!! error TS2322: Type 'S' is not assignable to type 'T': +!!! error TS2322: Property ''1.'' is missing in type 'S'. s = s2; // ok s = a2; ~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. s2 = t2; ~~ -!!! Type 'T2' is not assignable to type 'S2': -!!! Property ''1'' is missing in type 'T2'. +!!! error TS2322: Type 'T2' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type 'T2'. t2 = s2; ~~ -!!! Type 'S2' is not assignable to type 'T2': -!!! Property ''1.0'' is missing in type 'S2'. +!!! error TS2322: Type 'S2' is not assignable to type 'T2': +!!! error TS2322: Property ''1.0'' is missing in type 'S2'. s2 = t; ~~ -!!! Type 'T' is not assignable to type 'S2': -!!! Property ''1'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type 'T'. s2 = b; ~~ -!!! Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2': -!!! Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'. +!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; baz?: string; }'. s2 = a2; ~~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S2': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. a = b; ~ -!!! Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'. +!!! error TS2322: Type '{ '1.0': string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; baz?: string; }'. b = a; ~ -!!! Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }': -!!! Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'. +!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ '1.0': string; baz?: string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ '1.': string; bar?: string; }'. a = s; ~ -!!! Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S'. +!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S'. a = s2; ~ -!!! Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S2'. +!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S2'. a = a2; ~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'. a2 = b2; ~~ -!!! Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type '{ '1': string; }'. +!!! error TS2322: Type '{ '1': string; }' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ '1': string; }'. b2 = a2; ~~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1': string; }': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. a2 = b; // ok a2 = t2; // ok a2 = t; ~~ -!!! Type 'T' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type 'T'. } module NumbersAndStrings { @@ -113,8 +113,8 @@ s = s2; // ok s = a2; // error ~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. s2 = t2; // ok t2 = s2; // ok @@ -122,52 +122,52 @@ s2 = b; // ok s2 = a2; // error ~~ -!!! Type '{ '1.0': string; }' is not assignable to type 'S2': -!!! Property ''1'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type 'S2': +!!! error TS2322: Property ''1'' is missing in type '{ '1.0': string; }'. a = b; // error ~ -!!! Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'. +!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ 1.0: string; baz?: string; }'. b = a; // error ~ -!!! Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }': -!!! Property '1.0' is missing in type '{ '1.': string; bar?: string; }'. +!!! error TS2322: Type '{ '1.': string; bar?: string; }' is not assignable to type '{ 1.0: string; baz?: string; }': +!!! error TS2322: Property '1.0' is missing in type '{ '1.': string; bar?: string; }'. a = s; // error ~ -!!! Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S'. +!!! error TS2322: Type 'S' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S'. a = s2; // error ~ -!!! Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type 'S2'. +!!! error TS2322: Type 'S2' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type 'S2'. a = a2; // error ~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ '1.0': string; }'. a = b2; // error ~ -!!! Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }': -!!! Property ''1.'' is missing in type '{ 1.: string; }'. +!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.': string; bar?: string; }': +!!! error TS2322: Property ''1.'' is missing in type '{ 1.: string; }'. a2 = b2; // error ~~ -!!! Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type '{ 1.: string; }'. +!!! error TS2322: Type '{ 1.: string; }' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ 1.: string; }'. b2 = a2; // error ~~ -!!! Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }': -!!! Property '1.' is missing in type '{ '1.0': string; }'. +!!! error TS2322: Type '{ '1.0': string; }' is not assignable to type '{ 1.: string; }': +!!! error TS2322: Property '1.' is missing in type '{ '1.0': string; }'. a2 = b; // error ~~ -!!! Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'. +!!! error TS2322: Type '{ 1.0: string; baz?: string; }' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type '{ 1.0: string; baz?: string; }'. a2 = t2; // error ~~ -!!! Type 'T2' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type 'T2'. +!!! error TS2322: Type 'T2' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type 'T2'. a2 = t; // error ~~ -!!! Type 'T' is not assignable to type '{ '1.0': string; }': -!!! Property ''1.0'' is missing in type 'T'. +!!! error TS2322: Type 'T' is not assignable to type '{ '1.0': string; }': +!!! error TS2322: Property ''1.0'' is missing in type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt index 350ff22c18..99cd337c2f 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt @@ -17,19 +17,19 @@ g = f2; // Error ~ -!!! Type '(x: string) => string' is not assignable to type '(s1: string) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(s1: string) => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. g = f3; // Error ~ -!!! Type '(x: number) => number' is not assignable to type '(s1: string) => number': -!!! Types of parameters 'x' and 's1' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => number' is not assignable to type '(s1: string) => number': +!!! error TS2322: Types of parameters 'x' and 's1' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. g = f4; // Error ~ -!!! Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. class C { constructor(x: string); @@ -40,6 +40,6 @@ d = C; // Error ~ -!!! Type 'typeof C' is not assignable to type 'new (x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt index b9e63626e1..2c4ed51e31 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer.errors.txt @@ -15,19 +15,19 @@ a = b; // ok b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { class A { @@ -43,10 +43,10 @@ a1 = b1; // ok b1 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. class B2 extends A { [x: string]: Derived2; // ok @@ -56,37 +56,37 @@ a1 = b2; // ok b2 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! Type '{ [x: string]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b3 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! Type '{ [x: string]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b4 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt index e2ab94c037..8599efeede 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer2.errors.txt @@ -15,19 +15,19 @@ a = b; // ok b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. module Generics { interface A { @@ -43,10 +43,10 @@ a1 = b1; // ok b1 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. interface B2 extends A { [x: string]: Derived2; // ok @@ -56,37 +56,37 @@ a1 = b2; // ok b2 = a1; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'Base' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Base' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. function foo() { var b3: { [x: string]: Derived; }; var a3: A; a3 = b3; // error ~~ -!!! Type '{ [x: string]: Derived; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived' is not assignable to type 'T'. b3 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var b4: { [x: string]: Derived2; }; a3 = b4; // error ~~ -!!! Type '{ [x: string]: Derived2; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'Derived2' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: Derived2; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'Derived2' is not assignable to type 'T'. b4 = a3; // error ~~ -!!! Type 'A' is not assignable to type '{ [x: string]: Derived2; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'Derived2': -!!! Property 'baz' is missing in type 'Base'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'Derived2': +!!! error TS2322: Property 'baz' is missing in type 'Base'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt index f4f6dd269f..9dc8c906a0 100644 --- a/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithStringIndexer3.errors.txt @@ -7,7 +7,7 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b1: { [x: string]: string; } a = b1; // error b1 = a; // error @@ -22,13 +22,13 @@ var b: { [x: string]: string; } a = b; // error ~ -!!! Type '{ [x: string]: string; }' is not assignable to type 'A': -!!! Index signatures are incompatible: -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type '{ [x: string]: string; }' is not assignable to type 'A': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'T'. b = a; // error ~ -!!! Type 'A' is not assignable to type '{ [x: string]: string; }': -!!! Index signatures are incompatible: -!!! Type 'T' is not assignable to type 'string'. +!!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'T' is not assignable to type 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability10.errors.txt b/tests/baselines/reference/assignmentCompatability10.errors.txt index 25f76e83c0..733a9dba7e 100644 --- a/tests/baselines/reference/assignmentCompatability10.errors.txt +++ b/tests/baselines/reference/assignmentCompatability10.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__x4 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicAndOptional': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability11.errors.txt b/tests/baselines/reference/assignmentCompatability11.errors.txt index d56d0c3adc..461935659e 100644 --- a/tests/baselines/reference/assignmentCompatability11.errors.txt +++ b/tests/baselines/reference/assignmentCompatability11.errors.txt @@ -9,6 +9,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability12.errors.txt b/tests/baselines/reference/assignmentCompatability12.errors.txt index af8b57365b..1afd016298 100644 --- a/tests/baselines/reference/assignmentCompatability12.errors.txt +++ b/tests/baselines/reference/assignmentCompatability12.errors.txt @@ -9,6 +9,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability13.errors.txt b/tests/baselines/reference/assignmentCompatability13.errors.txt index 5cdfab0b13..c49d7592c9 100644 --- a/tests/baselines/reference/assignmentCompatability13.errors.txt +++ b/tests/baselines/reference/assignmentCompatability13.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability14.errors.txt b/tests/baselines/reference/assignmentCompatability14.errors.txt index 96b23b20dd..e38b89365f 100644 --- a/tests/baselines/reference/assignmentCompatability14.errors.txt +++ b/tests/baselines/reference/assignmentCompatability14.errors.txt @@ -9,6 +9,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability15.errors.txt b/tests/baselines/reference/assignmentCompatability15.errors.txt index 962b87624b..89d3b4e8e8 100644 --- a/tests/baselines/reference/assignmentCompatability15.errors.txt +++ b/tests/baselines/reference/assignmentCompatability15.errors.txt @@ -9,6 +9,6 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability16.errors.txt b/tests/baselines/reference/assignmentCompatability16.errors.txt index 0e8b5b045a..5c4407ec3b 100644 --- a/tests/baselines/reference/assignmentCompatability16.errors.txt +++ b/tests/baselines/reference/assignmentCompatability16.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability17.errors.txt b/tests/baselines/reference/assignmentCompatability17.errors.txt index ddf7bddabf..1e6ed6d144 100644 --- a/tests/baselines/reference/assignmentCompatability17.errors.txt +++ b/tests/baselines/reference/assignmentCompatability17.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'any[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: any[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'any[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability18.errors.txt b/tests/baselines/reference/assignmentCompatability18.errors.txt index 26f5fa6ede..314f956e52 100644 --- a/tests/baselines/reference/assignmentCompatability18.errors.txt +++ b/tests/baselines/reference/assignmentCompatability18.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability19.errors.txt b/tests/baselines/reference/assignmentCompatability19.errors.txt index cdfcf84aae..cf58fa3d3f 100644 --- a/tests/baselines/reference/assignmentCompatability19.errors.txt +++ b/tests/baselines/reference/assignmentCompatability19.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'number[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability20.errors.txt b/tests/baselines/reference/assignmentCompatability20.errors.txt index 0a198da552..df7bd57207 100644 --- a/tests/baselines/reference/assignmentCompatability20.errors.txt +++ b/tests/baselines/reference/assignmentCompatability20.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability21.errors.txt b/tests/baselines/reference/assignmentCompatability21.errors.txt index e8785413e0..102f5554c8 100644 --- a/tests/baselines/reference/assignmentCompatability21.errors.txt +++ b/tests/baselines/reference/assignmentCompatability21.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'string[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'string[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability22.errors.txt b/tests/baselines/reference/assignmentCompatability22.errors.txt index 6497d47710..8806cd61e2 100644 --- a/tests/baselines/reference/assignmentCompatability22.errors.txt +++ b/tests/baselines/reference/assignmentCompatability22.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability23.errors.txt b/tests/baselines/reference/assignmentCompatability23.errors.txt index 88f13a2ffc..d19b045957 100644 --- a/tests/baselines/reference/assignmentCompatability23.errors.txt +++ b/tests/baselines/reference/assignmentCompatability23.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'boolean[]': -!!! Property 'push' is missing in type 'String'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: boolean[]; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'boolean[]': +!!! error TS2322: Property 'push' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability24.errors.txt b/tests/baselines/reference/assignmentCompatability24.errors.txt index 70a6717b9b..2bcf00b81f 100644 --- a/tests/baselines/reference/assignmentCompatability24.errors.txt +++ b/tests/baselines/reference/assignmentCompatability24.errors.txt @@ -9,4 +9,4 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability25.errors.txt b/tests/baselines/reference/assignmentCompatability25.errors.txt index bc3de672ea..61571684e2 100644 --- a/tests/baselines/reference/assignmentCompatability25.errors.txt +++ b/tests/baselines/reference/assignmentCompatability25.errors.txt @@ -9,6 +9,6 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': -!!! Types of property 'two' are incompatible: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: number; }': +!!! error TS2322: Types of property 'two' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability26.errors.txt b/tests/baselines/reference/assignmentCompatability26.errors.txt index 771ae72eb4..681d09171d 100644 --- a/tests/baselines/reference/assignmentCompatability26.errors.txt +++ b/tests/baselines/reference/assignmentCompatability26.errors.txt @@ -9,6 +9,6 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability27.errors.txt b/tests/baselines/reference/assignmentCompatability27.errors.txt index 26948fe97e..7f9efc501d 100644 --- a/tests/baselines/reference/assignmentCompatability27.errors.txt +++ b/tests/baselines/reference/assignmentCompatability27.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ two: string; }': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability28.errors.txt b/tests/baselines/reference/assignmentCompatability28.errors.txt index 2b50a9b359..c17ea8f7f9 100644 --- a/tests/baselines/reference/assignmentCompatability28.errors.txt +++ b/tests/baselines/reference/assignmentCompatability28.errors.txt @@ -9,6 +9,6 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability29.errors.txt b/tests/baselines/reference/assignmentCompatability29.errors.txt index 937d511200..0b38ca41ac 100644 --- a/tests/baselines/reference/assignmentCompatability29.errors.txt +++ b/tests/baselines/reference/assignmentCompatability29.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'any[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: any[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'any[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability30.errors.txt b/tests/baselines/reference/assignmentCompatability30.errors.txt index 08a8b313d3..663e316aa5 100644 --- a/tests/baselines/reference/assignmentCompatability30.errors.txt +++ b/tests/baselines/reference/assignmentCompatability30.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: number[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability31.errors.txt b/tests/baselines/reference/assignmentCompatability31.errors.txt index c620198e2a..c885b1c25d 100644 --- a/tests/baselines/reference/assignmentCompatability31.errors.txt +++ b/tests/baselines/reference/assignmentCompatability31.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: string[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability32.errors.txt b/tests/baselines/reference/assignmentCompatability32.errors.txt index a20461b25b..0ca0d47b8f 100644 --- a/tests/baselines/reference/assignmentCompatability32.errors.txt +++ b/tests/baselines/reference/assignmentCompatability32.errors.txt @@ -9,7 +9,7 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'boolean[]': -!!! Property 'length' is missing in type 'Number'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ one: boolean[]; }': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability33.errors.txt b/tests/baselines/reference/assignmentCompatability33.errors.txt index 3f9f4716f8..34f566a99b 100644 --- a/tests/baselines/reference/assignmentCompatability33.errors.txt +++ b/tests/baselines/reference/assignmentCompatability33.errors.txt @@ -9,4 +9,4 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability34.errors.txt b/tests/baselines/reference/assignmentCompatability34.errors.txt index 1ae98d98d3..1313ef6df1 100644 --- a/tests/baselines/reference/assignmentCompatability34.errors.txt +++ b/tests/baselines/reference/assignmentCompatability34.errors.txt @@ -9,4 +9,4 @@ } __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability35.errors.txt b/tests/baselines/reference/assignmentCompatability35.errors.txt index ac6c09a8be..cb51814ec6 100644 --- a/tests/baselines/reference/assignmentCompatability35.errors.txt +++ b/tests/baselines/reference/assignmentCompatability35.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }': -!!! Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: number]: number; }': +!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability36.errors.txt b/tests/baselines/reference/assignmentCompatability36.errors.txt index acf5aa5344..dd0680b984 100644 --- a/tests/baselines/reference/assignmentCompatability36.errors.txt +++ b/tests/baselines/reference/assignmentCompatability36.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }': -!!! Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '{ [x: string]: any; }': +!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability37.errors.txt b/tests/baselines/reference/assignmentCompatability37.errors.txt index f097e9664d..37ad33d876 100644 --- a/tests/baselines/reference/assignmentCompatability37.errors.txt +++ b/tests/baselines/reference/assignmentCompatability37.errors.txt @@ -9,4 +9,4 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability38.errors.txt b/tests/baselines/reference/assignmentCompatability38.errors.txt index 9efa19b033..b97b7a5706 100644 --- a/tests/baselines/reference/assignmentCompatability38.errors.txt +++ b/tests/baselines/reference/assignmentCompatability38.errors.txt @@ -9,4 +9,4 @@ } __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. \ No newline at end of file +!!! error TS2323: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability39.errors.txt b/tests/baselines/reference/assignmentCompatability39.errors.txt index f924512d46..dc62944216 100644 --- a/tests/baselines/reference/assignmentCompatability39.errors.txt +++ b/tests/baselines/reference/assignmentCompatability39.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__x2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPublic': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability40.errors.txt b/tests/baselines/reference/assignmentCompatability40.errors.txt index db1948d7cb..7b558c70be 100644 --- a/tests/baselines/reference/assignmentCompatability40.errors.txt +++ b/tests/baselines/reference/assignmentCompatability40.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__x5 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate': -!!! Private property 'one' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPrivate': +!!! error TS2322: Private property 'one' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability41.errors.txt b/tests/baselines/reference/assignmentCompatability41.errors.txt index e21dc1c8cd..d3ffcd34a0 100644 --- a/tests/baselines/reference/assignmentCompatability41.errors.txt +++ b/tests/baselines/reference/assignmentCompatability41.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__x6 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate': -!!! Private property 'one' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithTwoPrivate': +!!! error TS2322: Private property 'one' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability42.errors.txt b/tests/baselines/reference/assignmentCompatability42.errors.txt index 2258a85139..743f929414 100644 --- a/tests/baselines/reference/assignmentCompatability42.errors.txt +++ b/tests/baselines/reference/assignmentCompatability42.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__x7 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate': -!!! Private property 'two' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'classWithPublicPrivate': +!!! error TS2322: Private property 'two' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability43.errors.txt b/tests/baselines/reference/assignmentCompatability43.errors.txt index 1ab4e3dcef..93ab669a83 100644 --- a/tests/baselines/reference/assignmentCompatability43.errors.txt +++ b/tests/baselines/reference/assignmentCompatability43.errors.txt @@ -9,5 +9,5 @@ } __test2__.__val__obj2 = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo': -!!! Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'interfaceTwo': +!!! error TS2322: Required property 'two' cannot be reimplemented with optional property in 'interfaceWithPublicAndOptional'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt index fdb719715e..9bcf523a76 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt @@ -10,20 +10,20 @@ // Should fail x = ''; ~ -!!! Type 'string' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type 'String'. x = ['']; ~ -!!! Type 'string[]' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type 'string[]'. +!!! error TS2322: Type 'string[]' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type 'string[]'. x = 4; ~ -!!! Type 'number' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type 'Number'. x = {}; ~ -!!! Type '{}' is not assignable to type 'Applicable': -!!! Property 'apply' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'Applicable': +!!! error TS2322: Property 'apply' is missing in type '{}'. // Should work function f() { }; @@ -34,17 +34,17 @@ // Should Fail fn(''); ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Applicable'. fn(['']); ~~~~ -!!! Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. fn(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Applicable'. fn({}); ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'Applicable'. -!!! Property 'apply' is missing in type '{}'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Applicable'. +!!! error TS2345: Property 'apply' is missing in type '{}'. // Should work diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt index 91c3cee429..fa8cb6d207 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt @@ -10,20 +10,20 @@ // Should fail x = ''; ~ -!!! Type 'string' is not assignable to type 'Callable': -!!! Property 'call' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type 'String'. x = ['']; ~ -!!! Type 'string[]' is not assignable to type 'Callable': -!!! Property 'call' is missing in type 'string[]'. +!!! error TS2322: Type 'string[]' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type 'string[]'. x = 4; ~ -!!! Type 'number' is not assignable to type 'Callable': -!!! Property 'call' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type 'Number'. x = {}; ~ -!!! Type '{}' is not assignable to type 'Callable': -!!! Property 'call' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'Callable': +!!! error TS2322: Property 'call' is missing in type '{}'. // Should work function f() { }; @@ -34,17 +34,17 @@ // Should Fail fn(''); ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'Callable'. fn(['']); ~~~~ -!!! Argument of type 'string[]' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'Callable'. fn(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Callable'. fn({}); ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'Callable'. -!!! Property 'call' is missing in type '{}'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'Callable'. +!!! error TS2345: Property 'call' is missing in type '{}'. // Should work diff --git a/tests/baselines/reference/assignmentLHSIsValue.errors.txt b/tests/baselines/reference/assignmentLHSIsValue.errors.txt index 90e6a7e3dc..b4ef6e6152 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/assignmentLHSIsValue.errors.txt @@ -6,146 +6,146 @@ class C { constructor() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. static sfoo() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } function foo() { this = value; } ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. this = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // identifiers: module, class, enum, function module M { export var a; } M = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. C = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { } E = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // literals null = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. true = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. false = value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. 0 = value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. '' = value; ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. /d+/ = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // object literals { a: 0} = value; ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. // array literals ['', ''] = value; ~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // super class Derived extends C { constructor() { super(); super = value; } ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo() { super = value } ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. static sfoo() { super = value; } ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } // function expression function bar() { } = value; ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. () => { } = value; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // function calls foo() = value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // parentheses, the containted expression is value (this) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (M) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (C) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (E) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo) = value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (null) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (true) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (0) = value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ('') = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (/d+/) = value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ({}) = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ([]) = value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (function baz() { }) = value; ~~~~~~~~~~~~~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo()) = value; ~~~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentStricterConstraints.errors.txt b/tests/baselines/reference/assignmentStricterConstraints.errors.txt index 37b4de1bfa..3045152eb4 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.errors.txt +++ b/tests/baselines/reference/assignmentStricterConstraints.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/assignmentStricterConstraints.ts (2 errors) ==== var f = function (x: T, y: S): void { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = y ~ -!!! Type 'S' is not assignable to type 'T'. +!!! error TS2323: Type 'S' is not assignable to type 'T'. } var g = function (x: T, y: S): void { } diff --git a/tests/baselines/reference/assignmentToFunction.errors.txt b/tests/baselines/reference/assignmentToFunction.errors.txt index 0e5d9351f2..38a254434e 100644 --- a/tests/baselines/reference/assignmentToFunction.errors.txt +++ b/tests/baselines/reference/assignmentToFunction.errors.txt @@ -2,7 +2,7 @@ function fn() { } fn = () => 3; ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. module foo { function xyz() { @@ -10,6 +10,6 @@ } bar = null; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } } \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObject.errors.txt b/tests/baselines/reference/assignmentToObject.errors.txt index 13f7725ff3..e1546238f0 100644 --- a/tests/baselines/reference/assignmentToObject.errors.txt +++ b/tests/baselines/reference/assignmentToObject.errors.txt @@ -3,7 +3,7 @@ var b: {} = a; // ok var c: Object = a; // should be error ~ -!!! Type '{ toString: number; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type 'number' is not assignable to type '() => string'. +!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type '() => string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt index fb5aeac1bc..aad2ca284d 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt +++ b/tests/baselines/reference/assignmentToObjectAndFunction.errors.txt @@ -1,9 +1,9 @@ ==== tests/cases/compiler/assignmentToObjectAndFunction.ts (3 errors) ==== var errObj: Object = { toString: 0 }; // Error, incompatible toString ~~~~~~ -!!! Type '{ toString: number; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type 'number' is not assignable to type '() => string'. +!!! error TS2322: Type '{ toString: number; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type '() => string'. var goodObj: Object = { toString(x?) { return ""; @@ -12,8 +12,8 @@ var errFun: Function = {}; // Error for no call signature ~~~~~~ -!!! Type '{}' is not assignable to type 'Function': -!!! Property 'apply' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'Function': +!!! error TS2322: Property 'apply' is missing in type '{}'. function foo() { } module foo { @@ -36,6 +36,6 @@ var badFundule: Function = bad; // error ~~~~~~~~~~ -!!! Type 'typeof bad' is not assignable to type 'Function': -!!! Types of property 'apply' are incompatible: -!!! Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'. \ No newline at end of file +!!! error TS2322: Type 'typeof bad' is not assignable to type 'Function': +!!! error TS2322: Types of property 'apply' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type '(thisArg: any, argArray?: any) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt b/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt index 3d56ed9d18..411f991aaa 100644 --- a/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedExpression1.errors.txt @@ -2,4 +2,4 @@ var x; (1, x)=0; ~~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt index 95e9d44ee4..ad55af3030 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.errors.txt @@ -4,10 +4,10 @@ (x) = 3; // OK x = ''; // Error ~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (x) = ''; // Error ~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. module M { export var y: number; @@ -17,20 +17,20 @@ (M.y) = 3; // OK M.y = ''; // Error ~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (M).y = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (M.y) = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. M = { y: 3 }; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (M) = { y: 3 }; // Error ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. module M2 { export module M3 { @@ -39,7 +39,7 @@ M3 = { x: 3 }; // Error ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } M2.M3 = { x: 3 }; // OK (M2).M3 = { x: 3 }; // OK @@ -47,60 +47,60 @@ M2.M3 = { x: '' }; // Error ~~~~~ -!!! Type '{ x: string; }' is not assignable to type 'typeof M3': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. (M2).M3 = { x: '' }; // Error ~~~~~~~ -!!! Type '{ x: string; }' is not assignable to type 'typeof M3': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. (M2.M3) = { x: '' }; // Error ~~~~~~~ -!!! Type '{ x: string; }' is not assignable to type 'typeof M3': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type 'typeof M3': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. function fn() { } fn = () => 3; // Bug 823548: Should be error (fn is not a reference) ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (fn) = () => 3; // Should be error ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function fn2(x: number, y: { t: number }) { x = 3; (x) = 3; // OK x = ''; // Error ~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (x) = ''; // Error ~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y).t = 3; // OK (y.t) = 3; // OK (y).t = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y.t) = ''; // Error ~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. y['t'] = 3; // OK (y)['t'] = 3; // OK (y['t']) = 3; // OK y['t'] = ''; // Error ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y)['t'] = ''; // Error ~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (y['t']) = ''; // Error ~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. } enum E { @@ -108,10 +108,10 @@ } E = undefined; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (E) = undefined; // Error ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. class C { @@ -119,8 +119,8 @@ C = undefined; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (C) = undefined; // Error ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToReferenceTypes.errors.txt b/tests/baselines/reference/assignmentToReferenceTypes.errors.txt index b67b5b075e..cc35728a1f 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.errors.txt +++ b/tests/baselines/reference/assignmentToReferenceTypes.errors.txt @@ -5,24 +5,24 @@ } M = null; ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. class C { } C = null; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { } E = null; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function f() { } f = null; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. var x = 1; x = null; diff --git a/tests/baselines/reference/assignments.errors.txt b/tests/baselines/reference/assignments.errors.txt index 5671c58d5b..fe9fe87faf 100644 --- a/tests/baselines/reference/assignments.errors.txt +++ b/tests/baselines/reference/assignments.errors.txt @@ -11,25 +11,25 @@ module M { } M = null; // Error ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. class C { } C = null; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { A } E = null; // Error ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. E.A = null; // OK per spec, Error per implementation (509581) ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function fn() { } fn = null; // Should be error ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. var v; v = null; // OK @@ -41,4 +41,4 @@ interface I { } I = null; // Error ~ -!!! Cannot find name 'I'. \ No newline at end of file +!!! error TS2304: Cannot find name 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt index 96306db9e3..625344f7b4 100644 --- a/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt +++ b/tests/baselines/reference/augmentedClassWithPrototypePropertyOnModule.errors.txt @@ -3,7 +3,7 @@ var f; var prototype; // This should be error since prototype would be static property on class m ~~~~~~~~~ -!!! Duplicate identifier 'prototype'. +!!! error TS2300: Duplicate identifier 'prototype'. } declare class m { } \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt index 4222ab54b1..14f0562882 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.errors.txt @@ -15,14 +15,14 @@ var v1: { ~~ -!!! Type '{}' is not assignable to type '{ [x: number]: Foo; }': -!!! Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }': +!!! error TS2322: Index signature is missing in type '{}'. [n: number]: Foo } = o; // Should be allowed var v2: { ~~ -!!! Type '() => void' is not assignable to type '{ [x: number]: Bar; }': -!!! Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }': +!!! error TS2322: Index signature is missing in type '() => void'. [n: number]: Bar } = f; // Should be allowed \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass.errors.txt b/tests/baselines/reference/augmentedTypesClass.errors.txt index ee05d11376..974035a591 100644 --- a/tests/baselines/reference/augmentedTypesClass.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass.errors.txt @@ -3,10 +3,10 @@ class c1 { public foo() { } } var c1 = 1; // error ~~ -!!! Duplicate identifier 'c1'. +!!! error TS2300: Duplicate identifier 'c1'. //// class then enum class c4 { public foo() { } } enum c4 { One } // error ~~ -!!! Duplicate identifier 'c4'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'c4'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass2.errors.txt b/tests/baselines/reference/augmentedTypesClass2.errors.txt index 7216ac604c..2a3a45fc8f 100644 --- a/tests/baselines/reference/augmentedTypesClass2.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2.errors.txt @@ -10,7 +10,7 @@ interface c11 { // error ~~~ -!!! Duplicate identifier 'c11'. +!!! error TS2300: Duplicate identifier 'c11'. bar(): void; } @@ -23,7 +23,7 @@ } enum c33 { One }; ~~~ -!!! Duplicate identifier 'c33'. +!!! error TS2300: Duplicate identifier 'c33'. // class then import class c44 { diff --git a/tests/baselines/reference/augmentedTypesClass2a.errors.txt b/tests/baselines/reference/augmentedTypesClass2a.errors.txt index 16edf2fb57..02717cf60f 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2a.errors.txt @@ -3,7 +3,7 @@ class c2 { public foo() { } } function c2() { } // error ~~ -!!! Duplicate identifier 'c2'. +!!! error TS2300: Duplicate identifier 'c2'. var c2 = () => { } ~~ -!!! Duplicate identifier 'c2'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'c2'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesClass4.errors.txt b/tests/baselines/reference/augmentedTypesClass4.errors.txt index f909cd9c26..bf9b2917c6 100644 --- a/tests/baselines/reference/augmentedTypesClass4.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass4.errors.txt @@ -3,5 +3,5 @@ class c3 { public foo() { } } class c3 { public bar() { } } // error ~~ -!!! Duplicate identifier 'c3'. +!!! error TS2300: Duplicate identifier 'c3'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesEnum.errors.txt b/tests/baselines/reference/augmentedTypesEnum.errors.txt index d888f170b5..77a572f798 100644 --- a/tests/baselines/reference/augmentedTypesEnum.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum.errors.txt @@ -3,37 +3,37 @@ enum e1111 { One } var e1111 = 1; // error ~~~~~ -!!! Duplicate identifier 'e1111'. +!!! error TS2300: Duplicate identifier 'e1111'. // enum then function enum e2 { One } function e2() { } // error ~~ -!!! Duplicate identifier 'e2'. +!!! error TS2300: Duplicate identifier 'e2'. enum e3 { One } var e3 = () => { } // error ~~ -!!! Duplicate identifier 'e3'. +!!! error TS2300: Duplicate identifier 'e3'. // enum then class enum e4 { One } class e4 { public foo() { } } // error ~~ -!!! Duplicate identifier 'e4'. +!!! error TS2300: Duplicate identifier 'e4'. // enum then enum enum e5 { One } enum e5 { Two } ~~~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. enum e5a { One } enum e5a { One } // error ~~~ -!!! Duplicate identifier 'One'. +!!! error TS2300: Duplicate identifier 'One'. ~~~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. // enum then internal module enum e6 { One } diff --git a/tests/baselines/reference/augmentedTypesEnum2.errors.txt b/tests/baselines/reference/augmentedTypesEnum2.errors.txt index 06581cf182..7edb136281 100644 --- a/tests/baselines/reference/augmentedTypesEnum2.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum2.errors.txt @@ -4,7 +4,7 @@ interface e1 { ~~ -!!! Duplicate identifier 'e1'. +!!! error TS2300: Duplicate identifier 'e1'. foo(): void; } @@ -14,7 +14,7 @@ enum e2 { One }; class e2 { // error ~~ -!!! Duplicate identifier 'e2'. +!!! error TS2300: Duplicate identifier 'e2'. foo() { return 1; } diff --git a/tests/baselines/reference/augmentedTypesEnum3.errors.txt b/tests/baselines/reference/augmentedTypesEnum3.errors.txt index c9e7bca61d..7a287ea6b8 100644 --- a/tests/baselines/reference/augmentedTypesEnum3.errors.txt +++ b/tests/baselines/reference/augmentedTypesEnum3.errors.txt @@ -16,7 +16,7 @@ enum A { c ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } module A { var p; diff --git a/tests/baselines/reference/augmentedTypesFunction.errors.txt b/tests/baselines/reference/augmentedTypesFunction.errors.txt index ab42d79d8f..8ebde23eef 100644 --- a/tests/baselines/reference/augmentedTypesFunction.errors.txt +++ b/tests/baselines/reference/augmentedTypesFunction.errors.txt @@ -3,35 +3,35 @@ function y1() { } var y1 = 1; // error ~~ -!!! Duplicate identifier 'y1'. +!!! error TS2300: Duplicate identifier 'y1'. // function then function function y2() { } function y2() { } // error ~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. function y2a() { } var y2a = () => { } // error ~~~ -!!! Duplicate identifier 'y2a'. +!!! error TS2300: Duplicate identifier 'y2a'. // function then class function y3() { } class y3 { } // error ~~ -!!! Duplicate identifier 'y3'. +!!! error TS2300: Duplicate identifier 'y3'. function y3a() { } class y3a { public foo() { } } // error ~~~ -!!! Duplicate identifier 'y3a'. +!!! error TS2300: Duplicate identifier 'y3a'. // function then enum function y4() { } enum y4 { One } // error ~~ -!!! Duplicate identifier 'y4'. +!!! error TS2300: Duplicate identifier 'y4'. // function then internal module function y5() { } diff --git a/tests/baselines/reference/augmentedTypesInterface.errors.txt b/tests/baselines/reference/augmentedTypesInterface.errors.txt index e26c2648c3..e3a6889c08 100644 --- a/tests/baselines/reference/augmentedTypesInterface.errors.txt +++ b/tests/baselines/reference/augmentedTypesInterface.errors.txt @@ -16,7 +16,7 @@ class i2 { // error ~~ -!!! Duplicate identifier 'i2'. +!!! error TS2300: Duplicate identifier 'i2'. bar() { return 1; } @@ -28,7 +28,7 @@ } enum i3 { One }; // error ~~ -!!! Duplicate identifier 'i3'. +!!! error TS2300: Duplicate identifier 'i3'. // interface then import interface i4 { diff --git a/tests/baselines/reference/augmentedTypesModules.errors.txt b/tests/baselines/reference/augmentedTypesModules.errors.txt index 6975ee3715..8f98f7f3bb 100644 --- a/tests/baselines/reference/augmentedTypesModules.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules.errors.txt @@ -6,12 +6,12 @@ module m1a { var y = 2; } var m1a = 1; ~~~ -!!! Duplicate identifier 'm1a'. +!!! error TS2300: Duplicate identifier 'm1a'. module m1b { export var y = 2; } var m1b = 1; ~~~ -!!! Duplicate identifier 'm1b'. +!!! error TS2300: Duplicate identifier 'm1b'. module m1c { export interface I { foo(): void; } @@ -23,7 +23,7 @@ } var m1d = 1; // error ~~~ -!!! Duplicate identifier 'm1d'. +!!! error TS2300: Duplicate identifier 'm1d'. // module then function module m2 { } @@ -31,12 +31,12 @@ module m2a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2b() { }; // error since the module is instantiated // should be errors to have function first @@ -61,7 +61,7 @@ module m3a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged class m3a { foo() { } } // error, class isn't ambient or declared before the module class m3b { foo() { } } diff --git a/tests/baselines/reference/augmentedTypesModules2.errors.txt b/tests/baselines/reference/augmentedTypesModules2.errors.txt index e25682fa39..82810cbe9e 100644 --- a/tests/baselines/reference/augmentedTypesModules2.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules2.errors.txt @@ -5,12 +5,12 @@ module m2a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2b() { }; // error since the module is instantiated function m2c() { }; @@ -18,7 +18,7 @@ module m2cc { export var y = 2; } ~~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged function m2cc() { }; // error to have module first module m2d { } diff --git a/tests/baselines/reference/augmentedTypesModules3.errors.txt b/tests/baselines/reference/augmentedTypesModules3.errors.txt index aa5bc0336a..dce5b5ba36 100644 --- a/tests/baselines/reference/augmentedTypesModules3.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules3.errors.txt @@ -5,5 +5,5 @@ module m3a { var y = 2; } ~~~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged class m3a { foo() { } } // error, class isn't ambient or declared before the module \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesVar.errors.txt b/tests/baselines/reference/augmentedTypesVar.errors.txt index 6edbb52ec5..d7ec8b581a 100644 --- a/tests/baselines/reference/augmentedTypesVar.errors.txt +++ b/tests/baselines/reference/augmentedTypesVar.errors.txt @@ -7,29 +7,29 @@ var x2 = 1; function x2() { } // should be an error ~~ -!!! Duplicate identifier 'x2'. +!!! error TS2300: Duplicate identifier 'x2'. var x3 = 1; var x3 = () => { } // should be an error ~~ -!!! Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'. // var then class var x4 = 1; class x4 { } // error ~~ -!!! Duplicate identifier 'x4'. +!!! error TS2300: Duplicate identifier 'x4'. var x4a = 1; class x4a { public foo() { } } // error ~~~ -!!! Duplicate identifier 'x4a'. +!!! error TS2300: Duplicate identifier 'x4a'. // var then enum var x5 = 1; enum x5 { One } // error ~~ -!!! Duplicate identifier 'x5'. +!!! error TS2300: Duplicate identifier 'x5'. // var then module var x6 = 1; @@ -38,12 +38,12 @@ var x6a = 1; module x6a { var y = 2; } // error since instantiated ~~~ -!!! Duplicate identifier 'x6a'. +!!! error TS2300: Duplicate identifier 'x6a'. var x6b = 1; module x6b { export var y = 2; } // error ~~~ -!!! Duplicate identifier 'x6b'. +!!! error TS2300: Duplicate identifier 'x6b'. // var then import, messes with other error reporting //var x7 = 1; diff --git a/tests/baselines/reference/autoLift2.errors.txt b/tests/baselines/reference/autoLift2.errors.txt index 6f62c8e9e4..3f607c9f76 100644 --- a/tests/baselines/reference/autoLift2.errors.txt +++ b/tests/baselines/reference/autoLift2.errors.txt @@ -5,18 +5,18 @@ constructor() { this.foo: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Property 'foo' does not exist on type 'A'. +!!! error TS2339: Property 'foo' does not exist on type 'A'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. this.bar: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } @@ -24,19 +24,19 @@ this.foo = "foo"; ~~~ -!!! Property 'foo' does not exist on type 'A'. +!!! error TS2339: Property 'foo' does not exist on type 'A'. this.bar = "bar"; ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. [1, 2].forEach((p) => this.foo); ~~~ -!!! Property 'foo' does not exist on type 'A'. +!!! error TS2339: Property 'foo' does not exist on type 'A'. [1, 2].forEach((p) => this.bar); ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. } diff --git a/tests/baselines/reference/autolift3.errors.txt b/tests/baselines/reference/autolift3.errors.txt index a73368620f..42ca5055b1 100644 --- a/tests/baselines/reference/autolift3.errors.txt +++ b/tests/baselines/reference/autolift3.errors.txt @@ -26,7 +26,7 @@ b.foo(); ~~~ -!!! Property 'foo' does not exist on type 'B'. +!!! error TS2339: Property 'foo' does not exist on type 'B'. diff --git a/tests/baselines/reference/autolift4.errors.txt b/tests/baselines/reference/autolift4.errors.txt index 9469d976c5..4e1f9966eb 100644 --- a/tests/baselines/reference/autolift4.errors.txt +++ b/tests/baselines/reference/autolift4.errors.txt @@ -19,7 +19,7 @@ getDist() { return Math.sqrt(this.x*this.x + this.y*this.y + this.z*this.m); ~ -!!! Property 'm' does not exist on type 'Point3D'. +!!! error TS2339: Property 'm' does not exist on type 'Point3D'. } } diff --git a/tests/baselines/reference/badArrayIndex.errors.txt b/tests/baselines/reference/badArrayIndex.errors.txt index 71228c95e2..e75b5ac288 100644 --- a/tests/baselines/reference/badArrayIndex.errors.txt +++ b/tests/baselines/reference/badArrayIndex.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/badArrayIndex.ts (2 errors) ==== var results = number[]; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. \ No newline at end of file +!!! error TS2304: Cannot find name 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/badArraySyntax.errors.txt b/tests/baselines/reference/badArraySyntax.errors.txt index 9c1edf9323..89a39c6025 100644 --- a/tests/baselines/reference/badArraySyntax.errors.txt +++ b/tests/baselines/reference/badArraySyntax.errors.txt @@ -6,19 +6,19 @@ var a1: Z[] = []; var a2 = new Z[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a3 = new Z[](); ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a4: Z[] = new Z[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a5: Z[] = new Z[](); ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var a6: Z[][] = new Z [ ] [ ]; ~~~~~~~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. \ No newline at end of file diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt index 392336db37..5b5189479e 100644 --- a/tests/baselines/reference/badExternalModuleReference.errors.txt +++ b/tests/baselines/reference/badExternalModuleReference.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ==== import a1 = require("garbage"); ~~~~~~~~~ -!!! Cannot find external module 'garbage'. +!!! error TS2307: Cannot find external module 'garbage'. export declare var a: { test1: a1.connectModule; (): a1.connectExport; diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index a09491ac45..2c1ebd5735 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -9,7 +9,7 @@ constructor(x: number) { super(0, loc); ~~~ -!!! Cannot find name 'loc'. +!!! error TS2304: Cannot find name 'loc'. } m() { @@ -19,30 +19,30 @@ class D extends C { constructor(public z: number) { super(this.z) } } // too few params ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. class E extends C { constructor(public z: number) { super(0, this.z) } } ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type ~~~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. function f() { if (x<10) { ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. x=11; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. } else { x=12; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt index eb083f30f3..3bfe9ad20b 100644 --- a/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt +++ b/tests/baselines/reference/baseTypePrivateMemberClash.errors.txt @@ -8,5 +8,5 @@ interface Z extends X, Y { } ~ -!!! Interface 'Z' cannot simultaneously extend types 'X' and 'Y': -!!! Named properties 'm' of types 'X' and 'Y' are not identical. \ No newline at end of file +!!! error TS2320: Interface 'Z' cannot simultaneously extend types 'X' and 'Y': +!!! error TS2320: Named properties 'm' of types 'X' and 'Y' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/bases.errors.txt b/tests/baselines/reference/bases.errors.txt index f4dc4ab5c8..33ad0b0174 100644 --- a/tests/baselines/reference/bases.errors.txt +++ b/tests/baselines/reference/bases.errors.txt @@ -7,38 +7,38 @@ constructor() { this.y: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property 'y' does not exist on type 'B'. +!!! error TS2339: Property 'y' does not exist on type 'B'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } } class C extends B implements I { ~ -!!! Class 'C' incorrectly implements interface 'I': -!!! Property 'x' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'I': +!!! error TS2421: Property 'x' is missing in type 'C'. constructor() { ~~~~~~~~~~~~~~~ this.x: any; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~~~~~~~~~~~ ~ -!!! Property 'x' does not exist on type 'C'. +!!! error TS2339: Property 'x' does not exist on type 'C'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } new C().x; ~ -!!! Property 'x' does not exist on type 'C'. +!!! error TS2339: Property 'x' does not exist on type 'C'. new C().y; ~ -!!! Property 'y' does not exist on type 'C'. +!!! error TS2339: Property 'y' does not exist on type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt index 9d86da98f3..2ff70b1d61 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions2.errors.txt @@ -11,31 +11,31 @@ var r2 = true ? 1 : ''; ~~~~~~~~~~~~~ -!!! No best common type exists between 'number' and 'string'. +!!! error TS2367: No best common type exists between 'number' and 'string'. var r9 = true ? derived : derived2; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between 'Derived' and 'Derived2'. +!!! error TS2367: No best common type exists between 'Derived' and 'Derived2'. function foo(t: T, u: U) { return true ? t : u; ~~~~~~~~~~~~ -!!! No best common type exists between 'T' and 'U'. +!!! error TS2367: No best common type exists between 'T' and 'U'. } function foo2(t: T, u: U) { // Error for referencing own type parameter ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return true ? t : u; // Ok because BCT(T, U) = U ~~~~~~~~~~~~ -!!! No best common type exists between 'T' and 'U'. +!!! error TS2367: No best common type exists between 'T' and 'U'. } function foo3(t: T, u: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return true ? t : u; ~~~~~~~~~~~~ -!!! No best common type exists between 'T' and 'U'. +!!! error TS2367: No best common type exists between 'T' and 'U'. } \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic3.errors.txt b/tests/baselines/reference/binaryArithmatic3.errors.txt index 74f3662aad..86f52acccb 100644 --- a/tests/baselines/reference/binaryArithmatic3.errors.txt +++ b/tests/baselines/reference/binaryArithmatic3.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/binaryArithmatic3.ts (2 errors) ==== var v = undefined | undefined; ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/binaryArithmatic4.errors.txt b/tests/baselines/reference/binaryArithmatic4.errors.txt index 87200bec11..0faac00706 100644 --- a/tests/baselines/reference/binaryArithmatic4.errors.txt +++ b/tests/baselines/reference/binaryArithmatic4.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/binaryArithmatic4.ts (2 errors) ==== var v = null | null; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/bind1.errors.txt b/tests/baselines/reference/bind1.errors.txt index 0f883d94f5..f29e9f8ace 100644 --- a/tests/baselines/reference/bind1.errors.txt +++ b/tests/baselines/reference/bind1.errors.txt @@ -2,7 +2,7 @@ module M { export class C implements I {} // this should be an unresolved symbol I error ~ -!!! Cannot find name 'I'. +!!! error TS2304: Cannot find name 'I'. } \ No newline at end of file diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt index 8ec2f4e040..6535b5a97c 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.errors.txt @@ -5,16 +5,16 @@ // operand before ~ var a = q~; //expect error ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // multiple operands after ~ var mul = ~[1, 2, "abc"], ""; //expect error ~~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. // miss an operand var b =~; ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt index 3513093d9f..045aceacf1 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.errors.txt @@ -46,13 +46,13 @@ var ResultIsNumber15 = ~(ANY + ANY1); var ResultIsNumber16 = ~(null + undefined); ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber17 = ~(null + null); ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber18 = ~(undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. // multiple ~ operators var ResultIsNumber19 = ~~ANY; diff --git a/tests/baselines/reference/boolInsteadOfBoolean.errors.txt b/tests/baselines/reference/boolInsteadOfBoolean.errors.txt index 611d98995d..31a230e72f 100644 --- a/tests/baselines/reference/boolInsteadOfBoolean.errors.txt +++ b/tests/baselines/reference/boolInsteadOfBoolean.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/conformance/types/primitives/boolean/boolInsteadOfBoolean.ts (1 errors) ==== var x: bool; ~~~~ -!!! Cannot find name 'bool'. +!!! error TS2304: Cannot find name 'bool'. var a: boolean = x; x = a; \ No newline at end of file diff --git a/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt b/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt index 667108c902..b84f0512dc 100644 --- a/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt +++ b/tests/baselines/reference/breakInIterationOrSwitchStatement4.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/breakInIterationOrSwitchStatement4.ts (1 errors) ==== for (var i in something) { ~~~~~~~~~ -!!! Cannot find name 'something'. +!!! error TS2304: Cannot find name 'something'. break; } \ No newline at end of file diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt index 6220fd09e9..08ed9cb42b 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement1.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/breakNotInIterationOrSwitchStatement1.ts (1 errors) ==== break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. \ No newline at end of file +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. \ No newline at end of file diff --git a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt index e34345f8e8..298e461659 100644 --- a/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt +++ b/tests/baselines/reference/breakNotInIterationOrSwitchStatement2.errors.txt @@ -3,6 +3,6 @@ function f() { break; ~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget5.errors.txt b/tests/baselines/reference/breakTarget5.errors.txt index a9b3932bcb..64c65aab1c 100644 --- a/tests/baselines/reference/breakTarget5.errors.txt +++ b/tests/baselines/reference/breakTarget5.errors.txt @@ -5,7 +5,7 @@ while (true) { break target; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } } \ No newline at end of file diff --git a/tests/baselines/reference/breakTarget6.errors.txt b/tests/baselines/reference/breakTarget6.errors.txt index 3a921bc6d3..c231036ae9 100644 --- a/tests/baselines/reference/breakTarget6.errors.txt +++ b/tests/baselines/reference/breakTarget6.errors.txt @@ -2,5 +2,5 @@ while (true) { break target; ~~~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. } \ No newline at end of file diff --git a/tests/baselines/reference/callConstructAssignment.errors.txt b/tests/baselines/reference/callConstructAssignment.errors.txt index e80dbcbfc3..bfd1eab035 100644 --- a/tests/baselines/reference/callConstructAssignment.errors.txt +++ b/tests/baselines/reference/callConstructAssignment.errors.txt @@ -7,7 +7,7 @@ foo = bar; // error ~~~ -!!! Type 'new () => any' is not assignable to type '() => void'. +!!! error TS2323: Type 'new () => any' is not assignable to type '() => void'. bar = foo; // error ~~~ -!!! Type '() => void' is not assignable to type 'new () => any'. \ No newline at end of file +!!! error TS2323: Type '() => void' is not assignable to type 'new () => any'. \ No newline at end of file diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt index dfe311ab86..e5d7e52894 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.errors.txt @@ -5,26 +5,26 @@ function f(x: T, y: U): T { return null; } var r1 = f(1, ''); ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r1b = f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f2 = (x: T, y: U): T => { return null; } var r2 = f2(1, ''); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2b = f2(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f3: { (x: T, y: U): T; } var r3 = f3(1, ''); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r3b = f3(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C { f(x: T, y: U): T { @@ -33,10 +33,10 @@ } var r4 = (new C()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r4b = (new C()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I { f(x: T, y: U): T; @@ -44,10 +44,10 @@ var i: I; var r5 = i.f(1, ''); ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r5b = i.f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C2 { f(x: T, y: U): T { @@ -56,10 +56,10 @@ } var r6 = (new C2()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r6b = (new C2()).f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I2 { f(x: T, y: U): T; @@ -67,7 +67,7 @@ var i2: I2; var r7 = i2.f(1, ''); ~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r7b = i2.f(1, ''); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt index 69284efdf8..747cf9f16d 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.errors.txt @@ -5,17 +5,17 @@ function f(x: number) { return null; } var r = f(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f2 = (x: number) => { return null; } var r2 = f2(1); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f3: { (x: number): any; } var r3 = f3(1); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C { f(x: number) { @@ -24,7 +24,7 @@ } var r4 = (new C()).f(1); ~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I { f(x: number): any; @@ -32,7 +32,7 @@ var i: I; var r5 = i.f(1); ~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class C2 { f(x: number) { @@ -41,7 +41,7 @@ } var r6 = (new C2()).f(1); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. interface I2 { f(x: number); @@ -49,14 +49,14 @@ var i2: I2; var r7 = i2.f(1); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var a; var r8 = a(); ~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. var a2: any; var r8 = a2(); ~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/callOnClass.errors.txt b/tests/baselines/reference/callOnClass.errors.txt index 9232fefe70..223ec90757 100644 --- a/tests/baselines/reference/callOnClass.errors.txt +++ b/tests/baselines/reference/callOnClass.errors.txt @@ -2,6 +2,6 @@ class C { } var c = C(); ~~~ -!!! Value of type 'typeof C' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof C' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/callOnInstance.errors.txt b/tests/baselines/reference/callOnInstance.errors.txt index da866a56e0..6c0e0b8d53 100644 --- a/tests/baselines/reference/callOnInstance.errors.txt +++ b/tests/baselines/reference/callOnInstance.errors.txt @@ -3,17 +3,17 @@ declare class D { constructor (value: number); } // Duplicate identifier ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. var s1: string = D(); // OK var s2: string = (new D(1))(); ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. declare class C { constructor(value: number); } (new C(1))(); // Error for calling an instance ~~~~~~~~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. \ No newline at end of file +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. \ No newline at end of file diff --git a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt index 46b7f099ff..b5d63735f7 100644 --- a/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt +++ b/tests/baselines/reference/callOverloadViaElementAccessExpression.errors.txt @@ -10,7 +10,7 @@ var c = new C(); var r: string = c['foo'](1); ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var r2: number = c['foo'](''); ~~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/callOverloads1.errors.txt b/tests/baselines/reference/callOverloads1.errors.txt index a561ffb0c8..6aed651541 100644 --- a/tests/baselines/reference/callOverloads1.errors.txt +++ b/tests/baselines/reference/callOverloads1.errors.txt @@ -9,9 +9,9 @@ function Foo(); // error ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. function F1(s:string); function F1(a:any) { return a;} @@ -21,4 +21,4 @@ f1.bar1(); Foo(); ~~~~~ -!!! Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? \ No newline at end of file +!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/callOverloads2.errors.txt b/tests/baselines/reference/callOverloads2.errors.txt index a715c13401..7c63ba336d 100644 --- a/tests/baselines/reference/callOverloads2.errors.txt +++ b/tests/baselines/reference/callOverloads2.errors.txt @@ -11,18 +11,18 @@ function Foo(); ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. function F1(s:string) {return s;} ~~ -!!! Function implementation name must be 'Foo'. +!!! error TS2389: Function implementation name must be 'Foo'. function F1(a:any) { return a;} // error - duplicate identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. function Goo(s:string); // error - no implementation ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. declare function Gar(s:String); // expect no error @@ -32,5 +32,5 @@ f1.bar1(); Foo(); ~~~~~ -!!! Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Foo' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/callOverloads3.errors.txt b/tests/baselines/reference/callOverloads3.errors.txt index e6b7fecb59..6736eb42fa 100644 --- a/tests/baselines/reference/callOverloads3.errors.txt +++ b/tests/baselines/reference/callOverloads3.errors.txt @@ -2,15 +2,15 @@ function Foo():Foo; ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. class Foo { ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } constructor(x: any) { // WScript.Echo("Constructor function has executed"); @@ -20,7 +20,7 @@ var f1 = new Foo("hey"); ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. f1.bar1(); diff --git a/tests/baselines/reference/callOverloads4.errors.txt b/tests/baselines/reference/callOverloads4.errors.txt index 5fafef84f4..87076a46f4 100644 --- a/tests/baselines/reference/callOverloads4.errors.txt +++ b/tests/baselines/reference/callOverloads4.errors.txt @@ -2,15 +2,15 @@ function Foo():Foo; ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. class Foo { ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. bar1() { /*WScript.Echo("bar1");*/ } constructor(s: string); constructor(x: any) { @@ -20,7 +20,7 @@ var f1 = new Foo("hey"); ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. f1.bar1(); diff --git a/tests/baselines/reference/callOverloads5.errors.txt b/tests/baselines/reference/callOverloads5.errors.txt index 7df261b7e0..fe7cc828ba 100644 --- a/tests/baselines/reference/callOverloads5.errors.txt +++ b/tests/baselines/reference/callOverloads5.errors.txt @@ -1,15 +1,15 @@ ==== tests/cases/compiler/callOverloads5.ts (5 errors) ==== function Foo():Foo; ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. function Foo(s:string):Foo; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. class Foo { ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. bar1(s:string); bar1(n:number); bar1(a:any) { /*WScript.Echo(a);*/ } @@ -21,7 +21,7 @@ var f1 = new Foo("hey"); ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. f1.bar1("a"); diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt index 1708786502..a828445808 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance.errors.txt @@ -57,10 +57,10 @@ // S's interface I2 extends Base2 { ~~ -!!! Interface 'I2' incorrectly extends interface 'Base2': -!!! Types of property 'a' are incompatible: -!!! Type '(x: number) => string' is not assignable to type '(x: number) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type '(x: number) => string' is not assignable to type '(x: number) => number': +!!! error TS2429: Type 'string' is not assignable to type 'number'. // N's a: (x: number) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt index 81cd8b924f..af3390d337 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance3.errors.txt @@ -51,11 +51,11 @@ interface I2 extends A { ~~ -!!! Interface 'I2' incorrectly extends interface 'A': -!!! Types of property 'a2' are incompatible: -!!! Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a2' are incompatible: +!!! error TS2429: Type '(x: T) => U[]' is not assignable to type '(x: number) => string[]': +!!! error TS2429: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. a2: (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -66,15 +66,15 @@ interface I4 extends A { ~~ -!!! Interface 'I4' incorrectly extends interface 'A': -!!! Types of property 'a8' are incompatible: -!!! Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a8' are incompatible: +!!! error TS2429: Type '(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2429: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2429: Types of property 'foo' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. a8: (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt index 7cd13f2faf..264d9eb52a 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.errors.txt @@ -3,13 +3,13 @@ function foo(x?: number = 1) { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. var f = function foo(x?: number = 1) { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. var f2 = (x: number, y? = 1) => { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. foo(1); foo(); @@ -21,7 +21,7 @@ class C { foo(x?: number = 1) { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. } var c: C; @@ -31,14 +31,14 @@ interface I { (x? = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x: number, y?: number = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } var i: I; @@ -50,14 +50,14 @@ var a: { (x?: number = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x? = 1); ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } a(); @@ -68,15 +68,15 @@ var b = { foo(x?: number = 1) { }, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. a: function foo(x: number, y?: number = '') { }, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. b: (x?: any = '') => { } ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. } b.foo(); diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt index 349e8513e7..2b8d12a8c2 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt @@ -9,5 +9,5 @@ test("expects boolean instead of string"); // should not error - "test" should not expect a boolean test(true); // should error - string expected ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt index b0df830315..ed6743b190 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt @@ -8,13 +8,13 @@ interface A extends I, I { } ~ -!!! Interface 'A' cannot simultaneously extend types 'I' and 'I': -!!! Named properties 'foo' of types 'I' and 'I' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'I' and 'I': +!!! error TS2320: Named properties 'foo' of types 'I' and 'I' are not identical. var x: A; // BUG 822524 var r = x.foo(1); // no error var r2 = x.foo(''); // error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt index f7d58ea096..2ed18421f4 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.errors.txt @@ -3,117 +3,117 @@ function foo(public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f = function foo(public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f2 = function (public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f3 = (x, private y) => { } ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f4 = (public x: T, y: T) => { } ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. function foo2(private x: string, public y: number) { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f5 = function foo(private x: string, public y: number) { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f6 = function (private x: string, public y: number) { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f7 = (private x: string, public y: number) => { } ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. var f8 = (private x: T, public y: T) => { } ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. class C { foo(public x, private y) { } ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo2(public x: number, private y: string) { } ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo3(public x: T, private y: T) { } ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } interface I { (private x, public y); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. (private x: string, public y: number); ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo(private x, public y); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo(public x: number, y: string); ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo3(x: T, private y: T); ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var a: { foo(public x, private y); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. foo2(private x: number, public y: string); ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. }; var b = { foo(public x, y) { }, ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. a: function foo(x: number, private y: string) { }, ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. b: (public x: T, private y: T) => { } ~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt index facb92dd46..c8c55510f6 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.errors.txt @@ -3,81 +3,81 @@ function foo(x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f = function foo(x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f2 = function (x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f3 = (x, x) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f4 = (x: T, x: T) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. function foo2(x: string, x: number) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f5 = function foo(x: string, x: number) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f6 = function (x: string, x: number) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f7 = (x: string, x: number) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. var f8 = (x: T, y: T) => { } class C { foo(x, x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo2(x: number, x: string) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } interface I { (x, x); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. (x: string, x: number); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo(x, x); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo(x: number, x: string); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo3(x: T, x: T); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } var a: { foo(x, x); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. foo2(x: number, x: string); ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. }; var b = { foo(x, x) { }, ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. a: function foo(x: number, x: string) { }, ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. b: (x: T, x: T) => { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt index 033fa6d51c..3c39f3d652 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.errors.txt @@ -24,10 +24,10 @@ interface I { (x = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x: number, y = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } var i: I; @@ -40,10 +40,10 @@ var a: { (x = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x = 1); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } a(); diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt index ad4a81aa7f..643adbc2d2 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.errors.txt @@ -4,7 +4,7 @@ function foo(x = 2); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function foo(x = 1) { } foo(1); @@ -13,7 +13,7 @@ class C { foo(x = 2); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. foo(x = 1) { } } @@ -24,10 +24,10 @@ var b = { foo(x = 1), ~ -!!! '{' expected. +!!! error TS1005: '{' expected. foo(x = 1) { }, ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } b.foo(); diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt index 027efabf4a..1238ff1a1e 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.errors.txt @@ -3,8 +3,8 @@ f(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. f(); f(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt index aaa831dc2a..0c9ce77950 100644 --- a/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt +++ b/tests/baselines/reference/callbackArgsDifferByOptionality.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/callbackArgsDifferByOptionality.ts (2 errors) ==== function x3(callback: (x?: 'hi') => number); ~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x3(callback: (x: string) => number); function x3(callback: (x: any) => number) { cb(); ~~ -!!! Cannot find name 'cb'. +!!! error TS2304: Cannot find name 'cb'. } \ No newline at end of file diff --git a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt index 504e08eadf..af09866d89 100644 --- a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt @@ -5,6 +5,6 @@ } var t = new M.ClassA[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Property 'ClassA' does not exist on type 'typeof M'. \ No newline at end of file +!!! error TS2339: Property 'ClassA' does not exist on type 'typeof M'. \ No newline at end of file diff --git a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt index 015bd2d43c..d60bcb420a 100644 --- a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts (1 errors) ==== var test: any[] = new any[1]; ~~~ -!!! Cannot find name 'any'. \ No newline at end of file +!!! error TS2304: Cannot find name 'any'. \ No newline at end of file diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt index 3052a7fb28..98154196c3 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt @@ -2,5 +2,5 @@ try { } catch (e: any) { ~ -!!! Catch clause parameter cannot have a type annotation. +!!! error TS1013: Catch clause parameter cannot have a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignment1.errors.txt b/tests/baselines/reference/chainedAssignment1.errors.txt index 9bab75fe15..6844c4ec96 100644 --- a/tests/baselines/reference/chainedAssignment1.errors.txt +++ b/tests/baselines/reference/chainedAssignment1.errors.txt @@ -21,11 +21,11 @@ var c3 = new Z(); c1 = c2 = c3; // a bug made this not report the same error as below ~~ -!!! Type 'Z' is not assignable to type 'X': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'X': +!!! error TS2322: Property 'a' is missing in type 'Z'. ~~ -!!! Type 'Z' is not assignable to type 'Y': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'Y': +!!! error TS2322: Property 'a' is missing in type 'Z'. c2 = c3; // Error TS111: Cannot convert Z to Y ~~ -!!! Type 'Z' is not assignable to type 'Y'. \ No newline at end of file +!!! error TS2323: Type 'Z' is not assignable to type 'Y'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignment3.errors.txt b/tests/baselines/reference/chainedAssignment3.errors.txt index 61d3417203..f1a4517ebb 100644 --- a/tests/baselines/reference/chainedAssignment3.errors.txt +++ b/tests/baselines/reference/chainedAssignment3.errors.txt @@ -18,11 +18,11 @@ // error cases b = a = new A(); ~ -!!! Type 'A' is not assignable to type 'B': -!!! Property 'value' is missing in type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'B': +!!! error TS2322: Property 'value' is missing in type 'A'. a = b = new A(); ~ -!!! Type 'A' is not assignable to type 'B'. +!!! error TS2323: Type 'A' is not assignable to type 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedAssignmentChecking.errors.txt b/tests/baselines/reference/chainedAssignmentChecking.errors.txt index f5580d38c0..7d14d9d0e8 100644 --- a/tests/baselines/reference/chainedAssignmentChecking.errors.txt +++ b/tests/baselines/reference/chainedAssignmentChecking.errors.txt @@ -21,9 +21,9 @@ c1 = c2 = c3; // Should be error ~~ -!!! Type 'Z' is not assignable to type 'X': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'X': +!!! error TS2322: Property 'a' is missing in type 'Z'. ~~ -!!! Type 'Z' is not assignable to type 'Y': -!!! Property 'a' is missing in type 'Z'. +!!! error TS2322: Type 'Z' is not assignable to type 'Y': +!!! error TS2322: Property 'a' is missing in type 'Z'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt index 0448b6d44a..937926abaa 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt @@ -19,4 +19,4 @@ // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); ~~~~~~~~~~ -!!! Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'. \ No newline at end of file +!!! error TS2345: Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index 3cb1395700..46a2dbbdae 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -7,12 +7,12 @@ // Ok to go down the chain, but error to climb up the chain (new Chain(t)).then(tt => s).then(ss => t); ~~~~~~~ -!!! Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. +!!! error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. // But error to try to climb up the chain (new Chain(s)).then(ss => t); ~~~~~~~ -!!! Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. +!!! error TS2345: Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. // Staying at T or S should be fine (new Chain(t)).then(tt => t).then(tt => t).then(tt => t); @@ -36,16 +36,16 @@ // Should get an error that we are assigning a string to a number (new Chain2(i)).then(ii => t).then(tt => s).value.x = ""; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. // Staying at T or S should keep the constraint. // Get an error when we assign a string to a number in both cases (new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x = ""; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. (new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x = ""; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. return null; } diff --git a/tests/baselines/reference/checkForObjectTooStrict.errors.txt b/tests/baselines/reference/checkForObjectTooStrict.errors.txt index cc2cfc4cf7..9f117e9241 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.errors.txt +++ b/tests/baselines/reference/checkForObjectTooStrict.errors.txt @@ -22,13 +22,13 @@ class Baz extends Object { ~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. constructor () { // ERROR, as expected super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } diff --git a/tests/baselines/reference/circularModuleImports.errors.txt b/tests/baselines/reference/circularModuleImports.errors.txt index 8ce4566a68..019d871e9d 100644 --- a/tests/baselines/reference/circularModuleImports.errors.txt +++ b/tests/baselines/reference/circularModuleImports.errors.txt @@ -5,7 +5,7 @@ import A = B; ~~~~~~~~~~~~~ -!!! Circular definition of import alias 'A'. +!!! error TS2303: Circular definition of import alias 'A'. import B = A; diff --git a/tests/baselines/reference/circularReference.errors.txt b/tests/baselines/reference/circularReference.errors.txt index 2a825b9fc8..204fe3c20f 100644 --- a/tests/baselines/reference/circularReference.errors.txt +++ b/tests/baselines/reference/circularReference.errors.txt @@ -8,14 +8,14 @@ this.m1 = new foo1.M1.C1(); this.m1.y = 10; // Error ~ -!!! Property 'y' does not exist on type 'C1'. +!!! error TS2339: Property 'y' does not exist on type 'C1'. this.m1.x = 20; // OK var tmp = new M1.C1(); tmp.y = 10; // OK tmp.x = 20; // Error ~ -!!! Property 'x' does not exist on type 'C1'. +!!! error TS2339: Property 'x' does not exist on type 'C1'. } } } @@ -23,7 +23,7 @@ ==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ==== import foo2 = require('./foo2'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export module M1 { export class C1 { m1: foo2.M1.C1; @@ -33,7 +33,7 @@ this.m1.y = 10; // OK this.m1.x = 20; // Error ~ -!!! Property 'x' does not exist on type 'C1'. +!!! error TS2339: Property 'x' does not exist on type 'C1'. } } } diff --git a/tests/baselines/reference/class1.errors.txt b/tests/baselines/reference/class1.errors.txt index 9acb45f4c2..5ad63072db 100644 --- a/tests/baselines/reference/class1.errors.txt +++ b/tests/baselines/reference/class1.errors.txt @@ -2,4 +2,4 @@ interface foo{ } class foo{ } ~~~ -!!! Duplicate identifier 'foo'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/class2.errors.txt b/tests/baselines/reference/class2.errors.txt index 5e362d9941..d2f6ea2f80 100644 --- a/tests/baselines/reference/class2.errors.txt +++ b/tests/baselines/reference/class2.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/class2.ts (2 errors) ==== class foo { constructor() { static f = 3; } } ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/classAndInterface1.errors.txt b/tests/baselines/reference/classAndInterface1.errors.txt index 6d6bb495c3..05ec176e50 100644 --- a/tests/baselines/reference/classAndInterface1.errors.txt +++ b/tests/baselines/reference/classAndInterface1.errors.txt @@ -2,4 +2,4 @@ class cli { } interface cli { } // error ~~~ -!!! Duplicate identifier 'cli'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'cli'. \ No newline at end of file diff --git a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt index 95c1893ff1..672c50f619 100644 --- a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt +++ b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt @@ -2,7 +2,7 @@ class C { foo: string; } interface C { foo: string; } // error ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. module M { class D { @@ -11,7 +11,7 @@ interface D { // error ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. bar: string; } } \ No newline at end of file diff --git a/tests/baselines/reference/classAndVariableWithSameName.errors.txt b/tests/baselines/reference/classAndVariableWithSameName.errors.txt index fa9d852a97..286dea3bdc 100644 --- a/tests/baselines/reference/classAndVariableWithSameName.errors.txt +++ b/tests/baselines/reference/classAndVariableWithSameName.errors.txt @@ -2,7 +2,7 @@ class C { foo: string; } var C = ''; // error ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. module M { class D { @@ -11,5 +11,5 @@ var D = 1; // error ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. } \ No newline at end of file diff --git a/tests/baselines/reference/classBodyWithStatements.errors.txt b/tests/baselines/reference/classBodyWithStatements.errors.txt index 840402821f..5d48cad484 100644 --- a/tests/baselines/reference/classBodyWithStatements.errors.txt +++ b/tests/baselines/reference/classBodyWithStatements.errors.txt @@ -2,18 +2,18 @@ class C { var x = 1; ~~~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. class C2 { function foo() {} ~~~~~~~~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var x = 1; var y = 2; diff --git a/tests/baselines/reference/classCannotExtendVar.errors.txt b/tests/baselines/reference/classCannotExtendVar.errors.txt index 94d116248f..82af8e9766 100644 --- a/tests/baselines/reference/classCannotExtendVar.errors.txt +++ b/tests/baselines/reference/classCannotExtendVar.errors.txt @@ -3,7 +3,7 @@ class Markup { ~~~~~~ -!!! Duplicate identifier 'Markup'. +!!! error TS2300: Duplicate identifier 'Markup'. constructor() { } } diff --git a/tests/baselines/reference/classConstructorAccessibility.errors.txt b/tests/baselines/reference/classConstructorAccessibility.errors.txt index fe2f1e2245..cff00748cc 100644 --- a/tests/baselines/reference/classConstructorAccessibility.errors.txt +++ b/tests/baselines/reference/classConstructorAccessibility.errors.txt @@ -6,7 +6,7 @@ class D { private constructor(public x: number) { } // error ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } var c = new C(1); @@ -20,7 +20,7 @@ class D { private constructor(public x: T) { } // error ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } var c = new C(1); diff --git a/tests/baselines/reference/classExpression.errors.txt b/tests/baselines/reference/classExpression.errors.txt index 220bd9581e..6201f8e205 100644 --- a/tests/baselines/reference/classExpression.errors.txt +++ b/tests/baselines/reference/classExpression.errors.txt @@ -1,27 +1,27 @@ ==== tests/cases/conformance/classes/classExpression.ts (7 errors) ==== var x = class C { ~~~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. } var y = { foo: class C2 { ~~~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! Cannot find name 'C2'. +!!! error TS2304: Cannot find name 'C2'. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. module M { var z = class C4 { ~~~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingPrimitive.errors.txt b/tests/baselines/reference/classExtendingPrimitive.errors.txt index 5b3ddb4fe7..07cb96c048 100644 --- a/tests/baselines/reference/classExtendingPrimitive.errors.txt +++ b/tests/baselines/reference/classExtendingPrimitive.errors.txt @@ -3,35 +3,35 @@ class C extends number { } ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. class C2 extends string { } ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. class C3 extends boolean { } ~~~~~~~ -!!! Cannot find name 'boolean'. +!!! error TS2304: Cannot find name 'boolean'. class C4 extends Void { } ~~~~ -!!! Cannot find name 'Void'. +!!! error TS2304: Cannot find name 'Void'. class C4a extends void {} ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. class C5 extends Null { } ~~~~ -!!! Cannot find name 'Null'. +!!! error TS2304: Cannot find name 'Null'. class C5a extends null { } ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. class C6 extends undefined { } ~~~~~~~~~ -!!! Cannot find name 'undefined'. +!!! error TS2304: Cannot find name 'undefined'. class C7 extends Undefined { } ~~~~~~~~~ -!!! Cannot find name 'Undefined'. +!!! error TS2304: Cannot find name 'Undefined'. enum E { A } class C8 extends E { } ~ -!!! A class may only extend another class. \ No newline at end of file +!!! error TS2311: A class may only extend another class. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingPrimitive2.errors.txt b/tests/baselines/reference/classExtendingPrimitive2.errors.txt index 9d1f62d535..2309bfa801 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.errors.txt +++ b/tests/baselines/reference/classExtendingPrimitive2.errors.txt @@ -3,9 +3,9 @@ class C4a extends void {} ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. class C5a extends null { } ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendingQualifiedName.errors.txt b/tests/baselines/reference/classExtendingQualifiedName.errors.txt index 626c9d551c..49b0f2640c 100644 --- a/tests/baselines/reference/classExtendingQualifiedName.errors.txt +++ b/tests/baselines/reference/classExtendingQualifiedName.errors.txt @@ -5,6 +5,6 @@ class D extends M.C { ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt index 01a09095a9..7e19c2c7b9 100644 --- a/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt +++ b/tests/baselines/reference/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt @@ -10,7 +10,7 @@ var A = 1; class B extends A { ~ -!!! Type name 'A' in extends clause does not reference constructor function for 'A'. +!!! error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'. b: string; } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt index a3329ee139..78c9215522 100644 --- a/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt +++ b/tests/baselines/reference/classExtendsClauseClassNotReferringConstructor.errors.txt @@ -4,6 +4,6 @@ var A = 1; class B extends A { b: string; } ~ -!!! Type name 'A' in extends clause does not reference constructor function for 'A'. +!!! error TS2419: Type name 'A' in extends clause does not reference constructor function for 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsEveryObjectType.errors.txt b/tests/baselines/reference/classExtendsEveryObjectType.errors.txt index 1c6dacfd6d..2cc5607291 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.errors.txt +++ b/tests/baselines/reference/classExtendsEveryObjectType.errors.txt @@ -4,28 +4,28 @@ } class C extends I { } // error ~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. class C2 extends { foo: string; } { } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. var x: { foo: string; } class C3 extends x { } // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. module M { export var x = 1; } class C4 extends M { } // error ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. function foo() { } class C5 extends foo { } // error ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. class C6 extends []{ } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt b/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt index 7a5573ae00..916e02a1e0 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt +++ b/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ==== class C2 extends { foo: string; } { } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. class C6 extends []{ } // error ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsInterface.errors.txt b/tests/baselines/reference/classExtendsInterface.errors.txt index 4274e5e708..62cb82f97b 100644 --- a/tests/baselines/reference/classExtendsInterface.errors.txt +++ b/tests/baselines/reference/classExtendsInterface.errors.txt @@ -2,12 +2,12 @@ interface Comparable {} class A extends Comparable {} ~~~~~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. class B implements Comparable {} interface Comparable2 {} class A2 extends Comparable2 {} ~~~~~~~~~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. class B2 implements Comparable2 {} \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt index a74abc3375..e3e1bca6ea 100644 --- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt +++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.errors.txt @@ -10,8 +10,8 @@ class D2 implements I { ~~ -!!! Class 'D2' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D2' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. public foo(x: any) { return x } private x = 3; other(x: any) { return x } diff --git a/tests/baselines/reference/classExtendsItself.errors.txt b/tests/baselines/reference/classExtendsItself.errors.txt index 6168ca3802..b80965f5a3 100644 --- a/tests/baselines/reference/classExtendsItself.errors.txt +++ b/tests/baselines/reference/classExtendsItself.errors.txt @@ -1,12 +1,12 @@ ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItself.ts (3 errors) ==== class C extends C { } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. class D extends D { } // error ~ -!!! Type 'D' recursively references itself as a base type. +!!! error TS2310: Type 'D' recursively references itself as a base type. class E extends E { } // error ~ -!!! Type 'E' recursively references itself as a base type. \ No newline at end of file +!!! error TS2310: Type 'E' recursively references itself as a base type. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt b/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt index 16184543cc..724c55254a 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt +++ b/tests/baselines/reference/classExtendsItselfIndirectly.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly.ts (2 errors) ==== class C extends E { foo: string; } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. class D extends C { bar: string; } @@ -9,7 +9,7 @@ class C2 extends E2 { foo: T; } // error ~~ -!!! Type 'C2' recursively references itself as a base type. +!!! error TS2310: Type 'C2' recursively references itself as a base type. class D2 extends C2 { bar: T; } diff --git a/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt b/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt index 0a5dcdd631..6de5c3ba7f 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt +++ b/tests/baselines/reference/classExtendsItselfIndirectly2.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts (2 errors) ==== class C extends N.E { foo: string; } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. module M { export class D extends C { bar: string; } @@ -15,7 +15,7 @@ module O { class C2 extends Q.E2 { foo: T; } // error ~~ -!!! Type 'C2' recursively references itself as a base type. +!!! error TS2310: Type 'C2' recursively references itself as a base type. module P { export class D2 extends C2 { bar: T; } diff --git a/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt b/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt index 3eeccb7e61..d170381ec1 100644 --- a/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt +++ b/tests/baselines/reference/classExtendsItselfIndirectly3.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file1.ts (1 errors) ==== class C extends E { foo: string; } // error ~ -!!! Type 'C' recursively references itself as a base type. +!!! error TS2310: Type 'C' recursively references itself as a base type. ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file2.ts (0 errors) ==== class D extends C { bar: string; } @@ -12,7 +12,7 @@ ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file4.ts (1 errors) ==== class C2 extends E2 { foo: T; } // error ~~ -!!! Type 'C2' recursively references itself as a base type. +!!! error TS2310: Type 'C2' recursively references itself as a base type. ==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly_file5.ts (0 errors) ==== class D2 extends C2 { bar: T; } diff --git a/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt b/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt index 545c2b2196..869b24992e 100644 --- a/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt +++ b/tests/baselines/reference/classExtendsMultipleBaseClasses.errors.txt @@ -3,6 +3,6 @@ class B { } class C extends A,B { } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt b/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt index 516154005c..f0054ebf6e 100644 --- a/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt +++ b/tests/baselines/reference/classExtendsShadowedConstructorFunction.errors.txt @@ -5,7 +5,7 @@ var C = 1; class D extends C { // error, C must evaluate to constructor function ~ -!!! Type name 'C' in extends clause does not reference constructor function for 'C'. +!!! error TS2419: Type name 'C' in extends clause does not reference constructor function for 'C'. bar: string; } } \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt b/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt index eb7571a243..b75bdff7ba 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.errors.txt @@ -5,4 +5,4 @@ class C extends foo { } // error, cannot extend it though ~~~ -!!! Cannot find name 'foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt b/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt index 216f434d16..384f40f266 100644 --- a/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt +++ b/tests/baselines/reference/classHeritageWithTrailingSeparator.errors.txt @@ -2,5 +2,5 @@ class C { foo: number } class D extends C, { ~ -!!! '{' expected. +!!! error TS1005: '{' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass2.errors.txt b/tests/baselines/reference/classImplementsClass2.errors.txt index a48b000b89..2e22e2b9e9 100644 --- a/tests/baselines/reference/classImplementsClass2.errors.txt +++ b/tests/baselines/reference/classImplementsClass2.errors.txt @@ -2,8 +2,8 @@ class A { foo(): number { return 1; } } class C implements A {} // error ~ -!!! Class 'C' incorrectly implements interface 'A': -!!! Property 'foo' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'A': +!!! error TS2421: Property 'foo' is missing in type 'C'. class C2 extends A { foo() { @@ -16,5 +16,5 @@ c = c2; c2 = c; ~~ -!!! Type 'C' is not assignable to type 'C2': -!!! Property 'foo' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2': +!!! error TS2322: Property 'foo' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass4.errors.txt b/tests/baselines/reference/classImplementsClass4.errors.txt index eb9848c63a..e7b4e7b0b3 100644 --- a/tests/baselines/reference/classImplementsClass4.errors.txt +++ b/tests/baselines/reference/classImplementsClass4.errors.txt @@ -5,8 +5,8 @@ } class C implements A { ~ -!!! Class 'C' incorrectly implements interface 'A': -!!! Property 'x' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'A': +!!! error TS2421: Property 'x' is missing in type 'C'. foo() { return 1; } @@ -19,5 +19,5 @@ c = c2; c2 = c; ~~ -!!! Type 'C' is not assignable to type 'C2': -!!! Property 'x' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2': +!!! error TS2322: Property 'x' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass5.errors.txt b/tests/baselines/reference/classImplementsClass5.errors.txt index 97f83fc83f..693e183b3b 100644 --- a/tests/baselines/reference/classImplementsClass5.errors.txt +++ b/tests/baselines/reference/classImplementsClass5.errors.txt @@ -5,8 +5,8 @@ } class C implements A { ~ -!!! Class 'C' incorrectly implements interface 'A': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'C' incorrectly implements interface 'A': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x = 1; foo() { return 1; @@ -19,9 +19,9 @@ var c2: C2; c = c2; ~ -!!! Type 'C2' is not assignable to type 'C': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2322: Type 'C2' is not assignable to type 'C': +!!! error TS2322: Private property 'x' cannot be reimplemented. c2 = c; ~~ -!!! Type 'C' is not assignable to type 'C2': -!!! Private property 'x' cannot be reimplemented. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C2': +!!! error TS2322: Private property 'x' cannot be reimplemented. \ No newline at end of file diff --git a/tests/baselines/reference/classImplementsClass6.errors.txt b/tests/baselines/reference/classImplementsClass6.errors.txt index 789c579fe9..e1fc04d481 100644 --- a/tests/baselines/reference/classImplementsClass6.errors.txt +++ b/tests/baselines/reference/classImplementsClass6.errors.txt @@ -20,7 +20,7 @@ c2 = c; c.bar(); // error ~~~ -!!! Property 'bar' does not exist on type 'C'. +!!! error TS2339: Property 'bar' does not exist on type 'C'. c2.bar(); // should error ~~~ -!!! Property 'bar' does not exist on type 'C2'. \ No newline at end of file +!!! error TS2339: Property 'bar' does not exist on type 'C2'. \ No newline at end of file diff --git a/tests/baselines/reference/classIndexer2.errors.txt b/tests/baselines/reference/classIndexer2.errors.txt index 4278564d8f..c0d99dc30d 100644 --- a/tests/baselines/reference/classIndexer2.errors.txt +++ b/tests/baselines/reference/classIndexer2.errors.txt @@ -4,7 +4,7 @@ x: number; y: string; ~~~~~~~~~~ -!!! Property 'y' of type 'string' is not assignable to string index type 'number'. +!!! error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. constructor() { } } \ No newline at end of file diff --git a/tests/baselines/reference/classIndexer3.errors.txt b/tests/baselines/reference/classIndexer3.errors.txt index f923a3364a..a850c156c0 100644 --- a/tests/baselines/reference/classIndexer3.errors.txt +++ b/tests/baselines/reference/classIndexer3.errors.txt @@ -9,5 +9,5 @@ x: number; y: string; ~~~~~~~~~~ -!!! Property 'y' of type 'string' is not assignable to string index type 'number'. +!!! error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/classIndexer4.errors.txt b/tests/baselines/reference/classIndexer4.errors.txt index 06559adf90..385ac44294 100644 --- a/tests/baselines/reference/classIndexer4.errors.txt +++ b/tests/baselines/reference/classIndexer4.errors.txt @@ -9,5 +9,5 @@ x: number; y: string; ~~~~~~~~~~ -!!! Property 'y' of type 'string' is not assignable to string index type 'number'. +!!! error TS2411: Property 'y' of type 'string' is not assignable to string index type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/classInheritence.errors.txt b/tests/baselines/reference/classInheritence.errors.txt index 0b655daf93..191d1983db 100644 --- a/tests/baselines/reference/classInheritence.errors.txt +++ b/tests/baselines/reference/classInheritence.errors.txt @@ -2,4 +2,4 @@ class B extends A { } class A extends A { } ~ -!!! Type 'A' recursively references itself as a base type. \ No newline at end of file +!!! error TS2310: Type 'A' recursively references itself as a base type. \ No newline at end of file diff --git a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt index fa5dcab097..c51f93795c 100644 --- a/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt +++ b/tests/baselines/reference/classIsSubtypeOfBaseType.errors.txt @@ -11,10 +11,10 @@ class Derived2 extends Base<{ bar: string; }> { ~~~~~~~~ -!!! Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>': -!!! Types of property 'foo' are incompatible: -!!! Type '{ bar?: string; }' is not assignable to type '{ bar: string; }': -!!! Required property 'bar' cannot be reimplemented with optional property in '{ bar?: string; }'. +!!! error TS2416: Class 'Derived2' incorrectly extends base class 'Base<{ bar: string; }>': +!!! error TS2416: Types of property 'foo' are incompatible: +!!! error TS2416: Type '{ bar?: string; }' is not assignable to type '{ bar: string; }': +!!! error TS2416: Required property 'bar' cannot be reimplemented with optional property in '{ bar?: string; }'. foo: { bar?: string; // error } diff --git a/tests/baselines/reference/classMemberInitializerScoping.errors.txt b/tests/baselines/reference/classMemberInitializerScoping.errors.txt index c34cdca7c9..088b9e4e73 100644 --- a/tests/baselines/reference/classMemberInitializerScoping.errors.txt +++ b/tests/baselines/reference/classMemberInitializerScoping.errors.txt @@ -3,12 +3,12 @@ class CCC { y: number = aaa; ~~~ -!!! Initializer of instance member variable 'y' cannot reference identifier 'aaa' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'y' cannot reference identifier 'aaa' declared in the constructor. static staticY: number = aaa; // This shouldnt be error constructor(aaa) { this.y = ''; // was: error, cannot assign string to number ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. } } diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt index 6f05862d76..890d367dea 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping.errors.txt @@ -23,7 +23,7 @@ messageHandler = () => { console.log(field1); // But this should be error as the field1 will resolve to var field1 ~~~~~~ -!!! Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. // but since this code would be generated inside constructor, in generated js // it would resolve to private field1 and thats not what user intended here. }; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt index d5864dac85..dceeadd45f 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping2.errors.txt @@ -11,7 +11,7 @@ messageHandler = () => { console.log(field1); // But this should be error as the field1 will resolve to var field1 ~~~~~~ -!!! Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. // but since this code would be generated inside constructor, in generated js // it would resolve to private field1 and thats not what user intended here. }; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt index e77499fca3..8619c18cb7 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.errors.txt @@ -7,13 +7,13 @@ }; export class Test1 { ~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. constructor(private field1: string) { } messageHandler = () => { console.log(field1); // But this should be error as the field1 will resolve to var field1 ~~~~~~ -!!! Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor. // but since this code would be generated inside constructor, in generated js // it would resolve to private field1 and thats not what user intended here. }; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt index 4926a2c641..f3b2e0881a 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (1 errors) ==== export var field1: string; ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (1 errors) ==== declare var console: { @@ -13,6 +13,6 @@ messageHandler = () => { console.log(field1); // Should be error that couldnt find symbol field1 ~~~~~~ -!!! Cannot find name 'field1'. +!!! error TS2304: Cannot find name 'field1'. }; } \ No newline at end of file diff --git a/tests/baselines/reference/classOverloadForFunction.errors.txt b/tests/baselines/reference/classOverloadForFunction.errors.txt index eb3fe5bc33..375dc97905 100644 --- a/tests/baselines/reference/classOverloadForFunction.errors.txt +++ b/tests/baselines/reference/classOverloadForFunction.errors.txt @@ -2,5 +2,5 @@ class foo { }; function foo() {} ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/classOverloadForFunction2.errors.txt b/tests/baselines/reference/classOverloadForFunction2.errors.txt index 3d73a8bb3f..dac1951642 100644 --- a/tests/baselines/reference/classOverloadForFunction2.errors.txt +++ b/tests/baselines/reference/classOverloadForFunction2.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/classOverloadForFunction2.ts (2 errors) ==== function bar(): string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. class bar {} ~~~ -!!! Duplicate identifier 'bar'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'bar'. \ No newline at end of file diff --git a/tests/baselines/reference/classPropertyAsPrivate.errors.txt b/tests/baselines/reference/classPropertyAsPrivate.errors.txt index c5d922c0ad..4e727b640b 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.errors.txt +++ b/tests/baselines/reference/classPropertyAsPrivate.errors.txt @@ -3,19 +3,19 @@ private x: string; private get y() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private set y(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private foo() { } private static a: string; private static get b() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set b(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static foo() { } } @@ -23,26 +23,26 @@ // all errors c.x; ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. c.y; ~~~ -!!! Property 'C.y' is inaccessible. +!!! error TS2341: Property 'C.y' is inaccessible. c.y = 1; ~~~ -!!! Property 'C.y' is inaccessible. +!!! error TS2341: Property 'C.y' is inaccessible. c.foo(); ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. C.a; ~~~ -!!! Property 'C.a' is inaccessible. +!!! error TS2341: Property 'C.a' is inaccessible. C.b(); ~~~ -!!! Property 'C.b' is inaccessible. +!!! error TS2341: Property 'C.b' is inaccessible. C.b = 1; ~~~ -!!! Property 'C.b' is inaccessible. +!!! error TS2341: Property 'C.b' is inaccessible. C.foo(); ~~~~~ -!!! Property 'C.foo' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C.foo' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt b/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt index c8c7f86dde..f43a6a6605 100644 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt @@ -3,19 +3,19 @@ x: string; get y() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set y(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { } static a: string; static get b() { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set b(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static foo() { } } diff --git a/tests/baselines/reference/classSideInheritance1.errors.txt b/tests/baselines/reference/classSideInheritance1.errors.txt index fa1035551e..c76aef11e0 100644 --- a/tests/baselines/reference/classSideInheritance1.errors.txt +++ b/tests/baselines/reference/classSideInheritance1.errors.txt @@ -12,9 +12,9 @@ var c: C2; a.bar(); // static off an instance - should be an error ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. c.bar(); // static off an instance - should be an error ~~~ -!!! Property 'bar' does not exist on type 'C2'. +!!! error TS2339: Property 'bar' does not exist on type 'C2'. A.bar(); // valid C2.bar(); // valid \ No newline at end of file diff --git a/tests/baselines/reference/classSideInheritance3.errors.txt b/tests/baselines/reference/classSideInheritance3.errors.txt index c7ce9606b0..845a81b729 100644 --- a/tests/baselines/reference/classSideInheritance3.errors.txt +++ b/tests/baselines/reference/classSideInheritance3.errors.txt @@ -16,8 +16,8 @@ var r1: typeof A = B; // error ~~ -!!! Type 'typeof B' is not assignable to type 'typeof A'. +!!! error TS2323: Type 'typeof B' is not assignable to type 'typeof A'. var r2: new (x: string) => A = B; // error ~~ -!!! Type 'typeof B' is not assignable to type 'new (x: string) => A'. +!!! error TS2323: Type 'typeof B' is not assignable to type 'new (x: string) => A'. var r3: typeof A = C; // ok \ No newline at end of file diff --git a/tests/baselines/reference/classTypeParametersInStatics.errors.txt b/tests/baselines/reference/classTypeParametersInStatics.errors.txt index 8fc40c979f..0c76b5a0e5 100644 --- a/tests/baselines/reference/classTypeParametersInStatics.errors.txt +++ b/tests/baselines/reference/classTypeParametersInStatics.errors.txt @@ -12,12 +12,12 @@ public static MakeHead(): List { // should error ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. var entry: List = new List(true, null); ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. entry.prev = entry; entry.next = entry; return entry; diff --git a/tests/baselines/reference/classUpdateTests.errors.txt b/tests/baselines/reference/classUpdateTests.errors.txt index f7f4036254..49d06c9203 100644 --- a/tests/baselines/reference/classUpdateTests.errors.txt +++ b/tests/baselines/reference/classUpdateTests.errors.txt @@ -34,7 +34,7 @@ class F extends E { constructor() {} // ERROR - super call required ~~~~~~~~~~~~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class G extends D { @@ -45,15 +45,15 @@ class H { constructor() { super(); } // ERROR - no super call allowed ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } class I extends Object { ~~~~~~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. constructor() { super(); } // ERROR - no super call allowed ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } class J extends G { @@ -71,13 +71,13 @@ ~~~~~~~~~~ } ~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class L extends G { ~ -!!! Class 'L' incorrectly extends base class 'G': -!!! Private property 'p1' cannot be reimplemented. +!!! error TS2416: Class 'L' incorrectly extends base class 'G': +!!! error TS2416: Private property 'p1' cannot be reimplemented. constructor(private p1:number) { super(); // NO ERROR } @@ -85,8 +85,8 @@ class M extends G { ~ -!!! Class 'M' incorrectly extends base class 'G': -!!! Private property 'p1' cannot be reimplemented. +!!! error TS2416: Class 'M' incorrectly extends base class 'G': +!!! error TS2416: Private property 'p1' cannot be reimplemented. constructor(private p1:number) { // ERROR ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var i = 0; @@ -95,7 +95,7 @@ ~~~~~~~~~~ } ~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } // @@ -117,29 +117,29 @@ constructor() { public p1 = 0; // ERROR ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. class P { constructor() { private p1 = 0; // ERROR ~~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. class Q { constructor() { public this.p1 = 0; // ERROR ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~ -!!! Property 'p1' does not exist on type 'Q'. +!!! error TS2339: Property 'p1' does not exist on type 'Q'. } } @@ -147,8 +147,8 @@ constructor() { private this.p1 = 0; // ERROR ~~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~ -!!! Property 'p1' does not exist on type 'R'. +!!! error TS2339: Property 'p1' does not exist on type 'R'. } } \ No newline at end of file diff --git a/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt b/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt index 28938907d7..208fb532ce 100644 --- a/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt +++ b/tests/baselines/reference/classWithBaseClassButNoConstructor.errors.txt @@ -10,7 +10,7 @@ var r = C; var c = new C(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c2 = new C(1); // ok class Base2 { @@ -24,7 +24,7 @@ var r2 = D; var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(1); // ok // specialized base class @@ -35,7 +35,7 @@ var r3 = D2; var d3 = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d4 = new D(1); // ok class D3 extends Base2 { @@ -45,5 +45,5 @@ var r4 = D3; var d5 = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d6 = new D(1); // ok \ No newline at end of file diff --git a/tests/baselines/reference/classWithConstructors.errors.txt b/tests/baselines/reference/classWithConstructors.errors.txt index f6612ca87f..221e5ed588 100644 --- a/tests/baselines/reference/classWithConstructors.errors.txt +++ b/tests/baselines/reference/classWithConstructors.errors.txt @@ -6,7 +6,7 @@ var c = new C(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c2 = new C(''); // ok class C2 { @@ -17,7 +17,7 @@ var c3 = new C2(); // error ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c4 = new C2(''); // ok var c5 = new C2(1); // ok @@ -25,7 +25,7 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(1); // ok var d3 = new D(''); // ok } @@ -37,7 +37,7 @@ var c = new C(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c2 = new C(''); // ok class C2 { @@ -48,7 +48,7 @@ var c3 = new C2(); // error ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var c4 = new C2(''); // ok var c5 = new C2(1, 2); // ok @@ -56,7 +56,7 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(1); // ok var d3 = new D(''); // ok } \ No newline at end of file diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt index 56f3457546..5629534d18 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt +++ b/tests/baselines/reference/classWithMultipleBaseClasses.errors.txt @@ -18,8 +18,8 @@ class D implements I, J { ~ -!!! Class 'D' incorrectly implements interface 'I': -!!! Property 'foo' is missing in type 'D'. +!!! error TS2421: Class 'D' incorrectly implements interface 'I': +!!! error TS2421: Property 'foo' is missing in type 'D'. baz() { } bat() { } } diff --git a/tests/baselines/reference/classWithOptionalParameter.errors.txt b/tests/baselines/reference/classWithOptionalParameter.errors.txt index 028e1f62df..e8ee89b6d3 100644 --- a/tests/baselines/reference/classWithOptionalParameter.errors.txt +++ b/tests/baselines/reference/classWithOptionalParameter.errors.txt @@ -4,17 +4,17 @@ class C { x?: string; ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. f?() {} ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } class C2 { x?: T; ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. f?(x: T) {} ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt index 1d2d5bb0c7..4aff1b532f 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.errors.txt @@ -4,5 +4,5 @@ foo(x): number; bar(x): any { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt index 9d4c0588e6..36d2ea840d 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.errors.txt @@ -3,8 +3,8 @@ foo(): string; bar(x): any { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. foo(x): number; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt b/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt index 47ff1f52e6..0b60032900 100644 --- a/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt +++ b/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt @@ -3,13 +3,13 @@ class any { } ~~~ -!!! Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any' class number { } ~~~~~~ -!!! Class name cannot be 'number' +!!! error TS2414: Class name cannot be 'number' class boolean { } ~~~~~~~ -!!! Class name cannot be 'boolean' +!!! error TS2414: Class name cannot be 'boolean' class string { } ~~~~~~ -!!! Class name cannot be 'string' \ No newline at end of file +!!! error TS2414: Class name cannot be 'string' \ No newline at end of file diff --git a/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt b/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt index 0d6065e7a7..59b52b4a05 100644 --- a/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt +++ b/tests/baselines/reference/classWithPredefinedTypesAsNames2.errors.txt @@ -3,4 +3,4 @@ class void {} ~~~~ -!!! Identifier expected. \ No newline at end of file +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/classWithPrivateProperty.errors.txt b/tests/baselines/reference/classWithPrivateProperty.errors.txt index aa1664bbb3..4f1a20de06 100644 --- a/tests/baselines/reference/classWithPrivateProperty.errors.txt +++ b/tests/baselines/reference/classWithPrivateProperty.errors.txt @@ -15,25 +15,25 @@ var c = new C(); var r1: string = c.x; ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. var r2: string = c.a; ~~~ -!!! Property 'C.a' is inaccessible. +!!! error TS2341: Property 'C.a' is inaccessible. var r3: string = c.b; ~~~ -!!! Property 'C.b' is inaccessible. +!!! error TS2341: Property 'C.b' is inaccessible. var r4: string = c.c(); ~~~ -!!! Property 'C.c' is inaccessible. +!!! error TS2341: Property 'C.c' is inaccessible. var r5: string = c.d(); ~~~ -!!! Property 'C.d' is inaccessible. +!!! error TS2341: Property 'C.d' is inaccessible. var r6: string = C.e; ~~~ -!!! Property 'C.e' is inaccessible. +!!! error TS2341: Property 'C.e' is inaccessible. var r7: string = C.f(); ~~~ -!!! Property 'C.f' is inaccessible. +!!! error TS2341: Property 'C.f' is inaccessible. var r8: string = C.g(); ~~~ -!!! Property 'C.g' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C.g' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/classWithStaticMembers.errors.txt b/tests/baselines/reference/classWithStaticMembers.errors.txt index 63f6d4b76e..ef37bf638b 100644 --- a/tests/baselines/reference/classWithStaticMembers.errors.txt +++ b/tests/baselines/reference/classWithStaticMembers.errors.txt @@ -3,10 +3,10 @@ static fn() { return this; } static get x() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set x(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. constructor(public a: number, private b: number) { } static foo: string; } diff --git a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt index 6ed2fe3f84..cf76fff058 100644 --- a/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt +++ b/tests/baselines/reference/classWithTwoConstructorDefinitions.errors.txt @@ -3,12 +3,12 @@ constructor() { } constructor(x) { } // error ~~~~~~~~~~~~~~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. } class D { constructor(x: T) { } constructor(x: T, y: T) { } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. } \ No newline at end of file diff --git a/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt b/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt index 8f21178ed7..decec9fab8 100644 --- a/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt +++ b/tests/baselines/reference/classWithoutExplicitConstructor.errors.txt @@ -7,7 +7,7 @@ var c = new C(); var c2 = new C(null); // error ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class D { x = 2 @@ -17,4 +17,4 @@ var d = new D(); var d2 = new D(null); // error ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/classdecl.errors.txt b/tests/baselines/reference/classdecl.errors.txt index fcb0ad8b25..306e7c9fac 100644 --- a/tests/baselines/reference/classdecl.errors.txt +++ b/tests/baselines/reference/classdecl.errors.txt @@ -12,17 +12,17 @@ public pv; public get d() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 30; } public set d() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public static get p2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return { x: 30, y: 40 }; } @@ -30,7 +30,7 @@ } private static get p3() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "string"; } private pv3; diff --git a/tests/baselines/reference/clinterfaces.errors.txt b/tests/baselines/reference/clinterfaces.errors.txt index e187459e4f..5d73177a7e 100644 --- a/tests/baselines/reference/clinterfaces.errors.txt +++ b/tests/baselines/reference/clinterfaces.errors.txt @@ -3,11 +3,11 @@ class C { } interface C { } ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. interface D { } class D { } ~ -!!! Duplicate identifier 'D'. +!!! error TS2300: Duplicate identifier 'D'. } interface Foo { @@ -16,7 +16,7 @@ class Foo{ ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. b: number; } @@ -26,7 +26,7 @@ interface Bar { ~~~ -!!! Duplicate identifier 'Bar'. +!!! error TS2300: Duplicate identifier 'Bar'. a: string; } diff --git a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt index 4d33163d69..9ac6949d56 100644 --- a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt @@ -4,7 +4,7 @@ ==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/cloduleStaticMembers.errors.txt b/tests/baselines/reference/cloduleStaticMembers.errors.txt index ad1a3572c9..b6b351e055 100644 --- a/tests/baselines/reference/cloduleStaticMembers.errors.txt +++ b/tests/baselines/reference/cloduleStaticMembers.errors.txt @@ -6,14 +6,14 @@ module Clod { var p = Clod.x; ~~~~~~ -!!! Property 'Clod.x' is inaccessible. +!!! error TS2341: Property 'Clod.x' is inaccessible. var q = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. var s = Clod.y; var t = y; ~ -!!! Cannot find name 'y'. +!!! error TS2304: Cannot find name 'y'. } \ No newline at end of file diff --git a/tests/baselines/reference/cloduleTest2.errors.txt b/tests/baselines/reference/cloduleTest2.errors.txt index a1355c0c9f..aedff3d156 100644 --- a/tests/baselines/reference/cloduleTest2.errors.txt +++ b/tests/baselines/reference/cloduleTest2.errors.txt @@ -4,7 +4,7 @@ declare class m3d { constructor(foo); foo(): void ; static bar(); } var r = new m3d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. } module T2 { @@ -12,7 +12,7 @@ module m3d { export var y = 2; } var r = new m3d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. } module T3 { @@ -22,10 +22,10 @@ r.foo(); r.bar(); // error ~~~ -!!! Property 'bar' does not exist on type 'm3d'. +!!! error TS2339: Property 'bar' does not exist on type 'm3d'. r.y; // error ~ -!!! Property 'y' does not exist on type 'm3d'. +!!! error TS2339: Property 'y' does not exist on type 'm3d'. } module T4 { @@ -35,19 +35,19 @@ r.foo(); r.bar(); // error ~~~ -!!! Property 'bar' does not exist on type 'm3d'. +!!! error TS2339: Property 'bar' does not exist on type 'm3d'. r.y; // error ~ -!!! Property 'y' does not exist on type 'm3d'. +!!! error TS2339: Property 'y' does not exist on type 'm3d'. } module m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void; static bar(); } var r = new m3d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. declare class m4d extends m3d { } var r2 = new m4d(); // error ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt index d4c17e19bd..5b2a7f7a2d 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt @@ -2,10 +2,10 @@ class C { get x() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } static foo() { } @@ -14,13 +14,13 @@ module C { export var x = 1; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module C { export function foo() { } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. export function x() { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt index 1eca71ea42..242a524df5 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt @@ -2,10 +2,10 @@ class C { set x(y) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set y(z) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } module C { @@ -14,5 +14,5 @@ module C { export function x() { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/clodulesDerivedClasses.errors.txt b/tests/baselines/reference/clodulesDerivedClasses.errors.txt index 8ee9d5817a..8474764204 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.errors.txt +++ b/tests/baselines/reference/clodulesDerivedClasses.errors.txt @@ -9,10 +9,10 @@ class Path extends Shape { ~~~~ -!!! Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape': -!!! Types of property 'Utils' are incompatible: -!!! Type 'typeof Utils' is not assignable to type 'typeof Utils': -!!! Property 'convert' is missing in type 'typeof Utils'. +!!! error TS2418: Class static side 'typeof Path' incorrectly extends base class static side 'typeof Shape': +!!! error TS2418: Types of property 'Utils' are incompatible: +!!! error TS2418: Type 'typeof Utils' is not assignable to type 'typeof Utils': +!!! error TS2418: Property 'convert' is missing in type 'typeof Utils'. name: string; } diff --git a/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt b/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt index 958ff48235..1e5d2d7e44 100644 --- a/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt +++ b/tests/baselines/reference/collisionArgumentsArrowFunctions.errors.txt @@ -1,12 +1,12 @@ ==== tests/cases/compiler/collisionArgumentsArrowFunctions.ts (2 errors) ==== var f1 = (i: number, ...arguments) => { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } var f12 = (arguments: number, ...rest) => { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } var f1NoError = (arguments: number) => { // no error diff --git a/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt b/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt index bff94980b7..2db5bb2dd6 100644 --- a/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt +++ b/tests/baselines/reference/collisionArgumentsClassConstructor.errors.txt @@ -3,14 +3,14 @@ class c1 { constructor(i: number, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } } class c12 { constructor(arguments: number, ...rest) { // error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } } @@ -34,7 +34,7 @@ class c3 { constructor(public arguments: number, ...restParameters) { //arguments is error ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } } @@ -59,7 +59,7 @@ constructor(i: string, ...arguments); // no codegen no error constructor(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } } @@ -69,7 +69,7 @@ constructor(arguments: string, ...rest); // no codegen no error constructor(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // no error } } diff --git a/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt b/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt index 57342c1006..e20b3010d5 100644 --- a/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt +++ b/tests/baselines/reference/collisionArgumentsClassMethod.errors.txt @@ -2,12 +2,12 @@ class c1 { public foo(i: number, ...arguments) { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } public foo1(arguments: number, ...rest) { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } public fooNoError(arguments: number) { // no error @@ -17,14 +17,14 @@ public f4(i: string, ...arguments); // no codegen no error public f4(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } public f41(arguments: number, ...rest); // no codegen no error public f41(arguments: string, ...rest); // no codegen no error public f41(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // no error } public f4NoError(arguments: number); // no error diff --git a/tests/baselines/reference/collisionArgumentsFunction.errors.txt b/tests/baselines/reference/collisionArgumentsFunction.errors.txt index 9d76598113..7e74088319 100644 --- a/tests/baselines/reference/collisionArgumentsFunction.errors.txt +++ b/tests/baselines/reference/collisionArgumentsFunction.errors.txt @@ -2,12 +2,12 @@ // Functions function f1(arguments: number, ...restParameters) { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } function f12(i: number, ...arguments) { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } function f1NoError(arguments: number) { // no error @@ -29,14 +29,14 @@ function f4(arguments: string, ...rest); // no codegen no error function f4(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // No error } function f42(i: number, ...arguments); // no codegen no error function f42(i: string, ...arguments); // no codegen no error function f42(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // No error } function f4NoError(arguments: number); // no error diff --git a/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt b/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt index d4b8bbd9e9..34d78a10e4 100644 --- a/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt +++ b/tests/baselines/reference/collisionArgumentsFunctionExpressions.errors.txt @@ -2,12 +2,12 @@ function foo() { function f1(arguments: number, ...restParameters) { //arguments is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments = 10; // no error } function f12(i: number, ...arguments) { //arguments is error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // no error } function f1NoError(arguments: number) { // no error @@ -25,14 +25,14 @@ function f4(arguments: string, ...rest); // no codegen no error function f4(arguments: any, ...rest) { // error ~~~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any; // No error } function f42(i: number, ...arguments); // no codegen no error function f42(i: string, ...arguments); // no codegen no error function f42(i: any, ...arguments) { // error ~~~~~~~~~~~~ -!!! Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. +!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. var arguments: any[]; // No error } function f4NoError(arguments: number); // no error diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt index 23c7fe49f7..2c4a0f6e33 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt @@ -5,7 +5,7 @@ private y; set Z(M) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.y = x; } } @@ -16,7 +16,7 @@ private y; set Z(p) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var M = 10; this.y = x; } @@ -28,7 +28,7 @@ private y; set M(p) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.y = x; } } @@ -38,7 +38,7 @@ class f { get Z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var M = 10; return x; } @@ -49,7 +49,7 @@ class e { get M() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return x; } } diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt index 2ed2ee5d10..e256e7ecfe 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndAlias.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/collisionExportsRequireAndAlias_file2.ts (2 errors) ==== import require = require('collisionExportsRequireAndAlias_file1'); // Error ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. import exports = require('collisionExportsRequireAndAlias_file3333'); // Error ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. export function foo() { require.bar(); } diff --git a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt index 8fea5b475f..7db0f41f09 100644 --- a/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndClass.errors.txt @@ -1,11 +1,11 @@ ==== tests/cases/compiler/collisionExportsRequireAndClass_externalmodule.ts (2 errors) ==== export class require { ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. } export class exports { ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. } module m1 { class require { diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt index 782e495836..9559192fb4 100644 --- a/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndEnum.errors.txt @@ -1,13 +1,13 @@ ==== tests/cases/compiler/collisionExportsRequireAndEnum_externalmodule.ts (2 errors) ==== export enum require { // Error ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. _thisVal1, _thisVal2, } export enum exports { // Error ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. _thisVal1, _thisVal2, } diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt index 49c6355c48..6944e96c06 100644 --- a/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndFunction.errors.txt @@ -1,12 +1,12 @@ ==== tests/cases/compiler/collisionExportsRequireAndFunction.ts (2 errors) ==== export function exports() { ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. return 1; } export function require() { ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. return "require"; } module m1 { diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt index 9facc72da2..d2311785e8 100644 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.errors.txt @@ -5,10 +5,10 @@ } import exports = m.c; ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. import require = m.c; ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. new exports(); new require(); diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt index 4f1f9c4cd4..de96a02940 100644 --- a/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndModule.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/collisionExportsRequireAndModule_externalmodule.ts (2 errors) ==== export module require { ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. export interface I { } export class C { @@ -12,7 +12,7 @@ } export module exports { ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. export interface I { } export class C { diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt index d5106a0fe5..6575c24387 100644 --- a/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt +++ b/tests/baselines/reference/collisionExportsRequireAndVar.errors.txt @@ -3,10 +3,10 @@ } var exports = 1; ~~~~~~~ -!!! Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'exports'. Compiler reserves name 'exports' in top level scope of an external module. var require = "require"; ~~~~~~~ -!!! Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. +!!! error TS2441: Duplicate identifier 'require'. Compiler reserves name 'require' in top level scope of an external module. module m1 { var exports = 0; var require = "require"; diff --git a/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt b/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt index 223565f664..be6a963dde 100644 --- a/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt +++ b/tests/baselines/reference/collisionRestParameterArrowFunctions.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/collisionRestParameterArrowFunctions.ts (1 errors) ==== var f1 = (_i: number, ...restParameters) => { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } var f1NoError = (_i: number) => { // no error diff --git a/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt b/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt index d64474d412..537c0e9d68 100644 --- a/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt +++ b/tests/baselines/reference/collisionRestParameterClassConstructor.errors.txt @@ -3,7 +3,7 @@ class c1 { constructor(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } } @@ -27,7 +27,7 @@ class c3 { constructor(public _i: number, ...restParameters) { //_i is error ~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } } @@ -49,7 +49,7 @@ constructor(_i: string, ...rest); // no codegen no error constructor(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i: any; // no error } } diff --git a/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt b/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt index 789901bc54..289487ef2b 100644 --- a/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt +++ b/tests/baselines/reference/collisionRestParameterClassMethod.errors.txt @@ -2,7 +2,7 @@ class c1 { public foo(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } public fooNoError(_i: number) { // no error @@ -12,7 +12,7 @@ public f4(_i: string, ...rest); // no codegen no error public f4(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i: any; // no error } diff --git a/tests/baselines/reference/collisionRestParameterFunction.errors.txt b/tests/baselines/reference/collisionRestParameterFunction.errors.txt index 3b3cb2a66a..66f16f37c7 100644 --- a/tests/baselines/reference/collisionRestParameterFunction.errors.txt +++ b/tests/baselines/reference/collisionRestParameterFunction.errors.txt @@ -2,7 +2,7 @@ // Functions function f1(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } function f1NoError(_i: number) { // no error @@ -23,7 +23,7 @@ function f4(_i: string, ...rest); // no codegen no error function f4(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. } function f4NoError(_i: number); // no error diff --git a/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt b/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt index 102693b2fc..0bd59bb5db 100644 --- a/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt +++ b/tests/baselines/reference/collisionRestParameterFunctionExpressions.errors.txt @@ -2,7 +2,7 @@ function foo() { function f1(_i: number, ...restParameters) { //_i is error ~~~~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. var _i = 10; // no error } function f1NoError(_i: number) { // no error @@ -19,7 +19,7 @@ function f4(_i: string, ...rest); // no codegen no error function f4(_i: any, ...rest) { // error ~~~~~~~ -!!! Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. +!!! error TS2397: Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter. } function f4NoError(_i: number); // no error diff --git a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt index cf43c5433e..6ef18bb224 100644 --- a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt +++ b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.errors.txt @@ -5,7 +5,7 @@ constructor(...args: any[]) { console.log(_i); // This should result in error ~~ -!!! Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter. +!!! error TS2398: Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter. } } new Foo(); \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt index 05b000677d..1a357e8653 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt @@ -4,14 +4,14 @@ class Foo { get prop1(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // No error } return 10; } set prop1(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // No error } } @@ -19,46 +19,46 @@ class b extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt index e6b0a98a4a..d05dcf74a4 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInConstructor.errors.txt @@ -14,7 +14,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { @@ -25,7 +25,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt index c4ba64b811..f6ea0ece1e 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInMethod.errors.txt @@ -15,7 +15,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } _super() { // No Error } @@ -27,7 +27,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } _super() { // No error diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt index 17ffba8834..11e55821c7 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInProperty.errors.txt @@ -16,7 +16,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt index 1a09105b30..2e3f66c784 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt @@ -3,51 +3,51 @@ class Foo { get prop1(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // No error return 10; } set prop1(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // No error } } class b extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { get prop2(): number { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } return 10; } set prop2(val: number) { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt index 7274264ffe..bb43ab6d73 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInConstructor.errors.txt @@ -10,7 +10,7 @@ super(); var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { @@ -19,7 +19,7 @@ var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt index c7bed57812..52c3fec809 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInMethod.errors.txt @@ -9,7 +9,7 @@ public foo() { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } class c extends Foo { @@ -17,7 +17,7 @@ var x = () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt index 481f080357..7d12cf84ce 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInProperty.errors.txt @@ -13,7 +13,7 @@ doStuff: () => { var _super = 10; // Should be error ~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } public _super = 10; // No error diff --git a/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt b/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt index 74fdc3ea68..761b603eb2 100644 --- a/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt +++ b/tests/baselines/reference/collisionSuperAndNameResolution.errors.txt @@ -9,6 +9,6 @@ x() { console.log(_super); // Error as this doesnt not resolve to user defined _super ~~~~~~ -!!! Expression resolves to '_super' that compiler uses to capture base class reference. +!!! error TS2402: Expression resolves to '_super' that compiler uses to capture base class reference. } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndParameter.errors.txt b/tests/baselines/reference/collisionSuperAndParameter.errors.txt index 4c6c0079fc..f016d6076c 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.errors.txt +++ b/tests/baselines/reference/collisionSuperAndParameter.errors.txt @@ -12,29 +12,29 @@ } set c(_super: number) { // No error ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class Foo2 extends Foo { x() { var lamda = (_super: number) => { // Error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. return x => this; // New scope. So should inject new _this capture } } y(_super: number) { // Error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } } set z(_super: number) { // Error ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } public prop3: { doStuff: (_super: number) => void; // no error - no code gen @@ -42,12 +42,12 @@ public prop4 = { doStuff: (_super: number) => { // should be error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } constructor(_super: number) { // should be error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -66,14 +66,14 @@ constructor(_super: string);// no code gen - no error constructor(_super: any) { // should be error ~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } y(_super: number); // no code gen - no error y(_super: string); // no code gen - no error y(_super: any) { // Error ~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } diff --git a/tests/baselines/reference/collisionSuperAndParameter1.errors.txt b/tests/baselines/reference/collisionSuperAndParameter1.errors.txt index ea3c3d9b42..960344a0c8 100644 --- a/tests/baselines/reference/collisionSuperAndParameter1.errors.txt +++ b/tests/baselines/reference/collisionSuperAndParameter1.errors.txt @@ -6,7 +6,7 @@ x() { var lambda = (_super: number) => { // Error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt index 5eed3b86bb..f4fcc9895e 100644 --- a/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt +++ b/tests/baselines/reference/collisionSuperAndPropertyNameAsConstuctorParameter.errors.txt @@ -5,7 +5,7 @@ class b1 extends a { constructor(_super: number) { // should be error ~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -13,7 +13,7 @@ class b2 extends a { constructor(private _super: number) { // should be error ~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -23,7 +23,7 @@ constructor(_super: string);// no code gen - no error constructor(_super: any) { // should be error ~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } @@ -33,7 +33,7 @@ constructor(_super: string);// no code gen - no error constructor(private _super: any) { // should be error ~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. +!!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. super(); } } \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt index d12256f419..0b5dbbbcd4 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.errors.txt @@ -5,4 +5,4 @@ var f = () => this; import _this = a; // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. \ No newline at end of file +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt index 0c6a7955e1..e3645ff88a 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.errors.txt @@ -4,4 +4,4 @@ var f = () => this; var a = new _this(); // Error ~~~~~ -!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file +!!! error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt index 77439118c9..3224d715ad 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.errors.txt @@ -3,4 +3,4 @@ var f = () => this; _this = 10; // Error ~~~~~ -!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file +!!! error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt index e4256953b8..1fc3e26cb9 100644 --- a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/collisionThisExpressionAndClassInGlobal.ts (1 errors) ==== class _this { ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. } var f = () => this; \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt index 8e31ac2429..e116911d29 100644 --- a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/collisionThisExpressionAndEnumInGlobal.ts (1 errors) ==== enum _this { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. _thisVal1, _thisVal2, } diff --git a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt index d76412ccad..73601bb3e5 100644 --- a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/collisionThisExpressionAndFunctionInGlobal.ts (1 errors) ==== function _this() { //Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return 10; } var f = () => this; \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt index 5b84e2b779..cf25c4c34a 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt @@ -2,12 +2,12 @@ class class1 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -16,12 +16,12 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -32,10 +32,10 @@ class class2 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); @@ -46,10 +46,10 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt index 17689e7d43..a1eb4125a8 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.errors.txt @@ -5,7 +5,7 @@ doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -16,7 +16,7 @@ constructor() { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt index 171f41fa10..6f09ec72b4 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.errors.txt @@ -5,6 +5,6 @@ function x() { var _this = 5; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. x => { console.log(this.x); }; } \ No newline at end of file diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt index 5e734c998a..b9a568ca29 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.errors.txt @@ -5,7 +5,7 @@ doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt index da6a81be80..a5c32c27e3 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.errors.txt @@ -5,7 +5,7 @@ doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -13,7 +13,7 @@ method2() { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return { doStuff: (callback) => () => { return callback(this); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt index 57a768213a..12197ba6a0 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.errors.txt @@ -4,7 +4,7 @@ doStuff: (callback) => () => { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return callback(this); } } @@ -14,7 +14,7 @@ constructor() { var _this = 2; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. } public prop1 = { doStuff: (callback) => () => { diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt index 307c829c98..dd0cfd17d6 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.errors.txt @@ -7,7 +7,7 @@ public foo() { var _this = 10; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var f = () => super.foo(); } } @@ -16,7 +16,7 @@ var f = () => { var _this = 10; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return super.foo() } } diff --git a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt index 7bd8fd289b..78bc20d6c2 100644 --- a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts (1 errors) ==== module _this { //Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. class c { } } diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt b/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt index 7684f5293b..066a4d3810 100644 --- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.errors.txt @@ -8,7 +8,7 @@ function inner() { console.log(_this); // Error as this doesnt not resolve to user defined _this ~~~~~ -!!! Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. +!!! error TS2400: Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference. return x => this; // New scope. So should inject new _this capture into function inner } } diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt b/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt index 0e3d594588..4bdcab810c 100644 --- a/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndParameter.errors.txt @@ -4,20 +4,20 @@ var _this = 10; // Local var. No this capture in x(), so no conflict. function inner(_this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return x => this; // New scope. So should inject new _this capture into function inner } } y() { var lamda = (_this: number) => { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. return x => this; // New scope. So should inject new _this capture } } z(_this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -40,7 +40,7 @@ class Foo1 { constructor(_this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); @@ -54,7 +54,7 @@ function f1(_this: number) { ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. x => { console.log(this.x); }; } @@ -69,7 +69,7 @@ constructor(_this: number); // no code gen - no error constructor(_this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var x2 = { doStuff: (callback) => () => { return callback(this); @@ -81,7 +81,7 @@ z(_this: number); // no code gen - no error z(_this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -95,7 +95,7 @@ function f3(_this: string); // no code gen - no error function f3(_this: any) { ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. x => { console.log(this.x); }; } diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt index bc60fffd80..6f0d0ea67f 100644 --- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.errors.txt @@ -2,7 +2,7 @@ class Foo2 { constructor(_this: number) { //Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -12,7 +12,7 @@ class Foo3 { constructor(private _this: number) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -24,7 +24,7 @@ constructor(_this: string); // No code gen - no error constructor(_this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } @@ -36,7 +36,7 @@ constructor(_this: string); // No code gen - no error constructor(private _this: any) { // Error ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var lambda = () => { return x => this; // New scope. So should inject new _this capture } diff --git a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt index c1c7e43f92..d061e32b69 100644 --- a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/collisionThisExpressionAndVarInGlobal.ts (1 errors) ==== var _this = 1; ~~~~~ -!!! Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. +!!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. var f = () => this; \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt b/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt index d426c3f5eb..740c36ca73 100644 --- a/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt +++ b/tests/baselines/reference/commaOperatorInvalidAssignmentType.errors.txt @@ -10,22 +10,22 @@ //Expect errors when the results type is different form the second operand resultIsBoolean = (BOOLEAN, STRING); ~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2323: Type 'string' is not assignable to type 'boolean'. resultIsBoolean = (BOOLEAN, NUMBER); ~~~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'boolean'. +!!! error TS2323: Type 'number' is not assignable to type 'boolean'. resultIsNumber = (NUMBER, BOOLEAN); ~~~~~~~~~~~~~~ -!!! Type 'boolean' is not assignable to type 'number'. +!!! error TS2323: Type 'boolean' is not assignable to type 'number'. resultIsNumber = (NUMBER, STRING); ~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. resultIsString = (STRING, BOOLEAN); ~~~~~~~~~~~~~~ -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2323: Type 'boolean' is not assignable to type 'string'. resultIsString = (STRING, NUMBER); ~~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt index e8a8027eab..54f2dd4a8b 100644 --- a/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt +++ b/tests/baselines/reference/commaOperatorOtherInvalidOperation.errors.txt @@ -6,7 +6,7 @@ } var resultIsString: number = foo(1, "123"); //error here ~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. //TypeParameters function foo1() { @@ -14,5 +14,5 @@ var y: T2; var result: T1 = (x, y); //error here ~~~~~~ -!!! Type 'T2' is not assignable to type 'T1'. +!!! error TS2323: Type 'T2' is not assignable to type 'T1'. } \ No newline at end of file diff --git a/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt b/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt index a213d41649..7fa07a19d2 100644 --- a/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt +++ b/tests/baselines/reference/commaOperatorWithoutOperand.errors.txt @@ -9,40 +9,40 @@ // Missing the second operand (ANY, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (BOOLEAN, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (NUMBER, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (STRING, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (OBJECT, ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // Missing the first operand (, ANY); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, BOOLEAN); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, NUMBER); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, STRING); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. (, OBJECT); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // Missing all operands ( , ); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnClassAccessor1.errors.txt b/tests/baselines/reference/commentOnClassAccessor1.errors.txt index b434f9fc57..a54ac91925 100644 --- a/tests/baselines/reference/commentOnClassAccessor1.errors.txt +++ b/tests/baselines/reference/commentOnClassAccessor1.errors.txt @@ -5,5 +5,5 @@ */ get bar(): number { return 1;} ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/commentOnClassAccessor2.errors.txt b/tests/baselines/reference/commentOnClassAccessor2.errors.txt index 137490042a..107578f5ab 100644 --- a/tests/baselines/reference/commentOnClassAccessor2.errors.txt +++ b/tests/baselines/reference/commentOnClassAccessor2.errors.txt @@ -5,12 +5,12 @@ */ get bar(): number { return 1;} ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. /** * Setter. */ set bar(v) { } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement1.errors.txt b/tests/baselines/reference/commentOnImportStatement1.errors.txt index 580b96bd61..3e76f3072d 100644 --- a/tests/baselines/reference/commentOnImportStatement1.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement1.errors.txt @@ -3,5 +3,5 @@ import foo = require('./foo'); ~~~~~~~ -!!! Cannot find external module './foo'. +!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement2.errors.txt b/tests/baselines/reference/commentOnImportStatement2.errors.txt index 5b600cf4bc..b513c97848 100644 --- a/tests/baselines/reference/commentOnImportStatement2.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement2.errors.txt @@ -2,4 +2,4 @@ /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! Cannot find external module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentOnImportStatement3.errors.txt b/tests/baselines/reference/commentOnImportStatement3.errors.txt index dede9f0f71..eed60279d7 100644 --- a/tests/baselines/reference/commentOnImportStatement3.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement3.errors.txt @@ -4,4 +4,4 @@ /* not copyright */ import foo = require('./foo'); ~~~~~~~ -!!! Cannot find external module './foo'. \ No newline at end of file +!!! error TS2307: Cannot find external module './foo'. \ No newline at end of file diff --git a/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt b/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt index dd737b2b54..fe0311440f 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt +++ b/tests/baselines/reference/commentsOnObjectLiteral1.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/commentsOnObjectLiteral1.ts (1 errors) ==== var Person = makeClass( ~~~~~~~~~ -!!! Cannot find name 'makeClass'. +!!! error TS2304: Cannot find name 'makeClass'. /** @scope Person */ diff --git a/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt b/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt index aa338e31db..e966abb38c 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt +++ b/tests/baselines/reference/commentsOnObjectLiteral2.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/commentsOnObjectLiteral2.ts (1 errors) ==== var Person = makeClass( ~~~~~~~~~ -!!! Cannot find name 'makeClass'. +!!! error TS2304: Cannot find name 'makeClass'. { /** This is just another way to define a constructor. diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt index c866a79e23..21554a8086 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.errors.txt @@ -35,327 +35,327 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r1a3 = a3 < b3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r1a4 = a4 < b4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r1a5 = a5 < b5; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r1a6 = a6 < b6; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r1a7 = a7 < b7; var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r1b3 = b3 < a3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r1b4 = b4 < a4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r1b5 = b5 < a5; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r1b6 = b6 < a6; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r1b7 = b7 < a7; // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r2a3 = a3 > b3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r2a4 = a4 > b4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r2a5 = a5 > b5; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r2a6 = a6 > b6; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r2a7 = a7 > b7; var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r2b3 = b3 > a3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r2b4 = b4 > a4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r2b5 = b5 > a5; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r2b6 = b6 > a6; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r2b7 = b7 > a7; // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r3a3 = a3 <= b3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r3a4 = a4 <= b4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r3a5 = a5 <= b5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r3a6 = a6 <= b6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r3a7 = a7 <= b7; var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r3b3 = b3 <= a3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r3b4 = b4 <= a4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r3b5 = b5 <= a5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r3b6 = b6 <= a6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r3b7 = b7 <= a7; // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r4a3 = a3 >= b3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r4a4 = a4 >= b4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r4a5 = a5 >= b5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r4a6 = a6 >= b6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r4a7 = a7 >= b7; var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r4b3 = b3 >= a3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r4b4 = b4 >= a4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r4b5 = b5 >= a5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r4b6 = b6 >= a6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r4b7 = b7 >= a7; // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r5a3 = a3 == b3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r5a4 = a4 == b4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r5a5 = a5 == b5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r5a6 = a6 == b6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r5a7 = a7 == b7; var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r5b3 = b3 == a3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r5b4 = b4 == a4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r5b5 = b5 == a5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r5b6 = b6 == a6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r5b7 = b7 == a7; // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r6a3 = a3 != b3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r6a4 = a4 != b4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r6a5 = a5 != b5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r6a6 = a6 != b6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r6a7 = a7 != b7; var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r6b3 = b3 != a3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r6b4 = b4 != a4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r6b5 = b5 != a5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r6b6 = b6 != a6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r6b7 = b7 != a7; // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r7a5 = a5 === b5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r7a6 = a6 === b6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r7a7 = a7 === b7; var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r7b5 = b5 === a5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r7b6 = b6 === a6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r7b7 = b7 === a7; // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: number, b: string): void; }' and '{ fn(a: string): void; }'. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: Base, b: string): void; }' and '{ fn(a: Derived, b: Base): void; }'. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and '{ fn(): C; }'. var r8a5 = a5 !== b5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a?: Base): void; }' and '{ fn(a?: C): void; }'. var r8a6 = a6 !== b6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(...a: Base[]): void; }' and '{ fn(...a: C[]): void; }'. var r8a7 = a7 !== b7; var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: string): void; }' and '{ fn(a: number, b: string): void; }'. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a: Derived, b: Base): void; }' and '{ fn(a: Base, b: string): void; }'. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): C; }' and '{ fn(): Base; }'. var r8b5 = b5 !== a5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(a?: C): void; }' and '{ fn(a?: Base): void; }'. var r8b6 = b6 !== a6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(...a: C[]): void; }' and '{ fn(...a: Base[]): void; }'. var r8b7 = b7 !== a7; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt index d0cfd9493b..8b41e8e150 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.errors.txt @@ -35,327 +35,327 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r1a3 = a3 < b3; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r1a4 = a4 < b4; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and 'new () => C'. var r1a5 = a5 < b5; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r1a6 = a6 < b6; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r1a7 = a7 < b7; var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r1b3 = b3 < a3; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r1b4 = b4 < a4; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new () => C' and 'new () => Base'. var r1b5 = b5 < a5; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r1b6 = b6 < a6; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r1b7 = b7 < a7; // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r2a3 = a3 > b3; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r2a4 = a4 > b4; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and 'new () => C'. var r2a5 = a5 > b5; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r2a6 = a6 > b6; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r2a7 = a7 > b7; var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r2b3 = b3 > a3; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r2b4 = b4 > a4; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new () => C' and 'new () => Base'. var r2b5 = b5 > a5; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r2b6 = b6 > a6; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r2b7 = b7 > a7; // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r3a3 = a3 <= b3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r3a4 = a4 <= b4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and 'new () => C'. var r3a5 = a5 <= b5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r3a6 = a6 <= b6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r3a7 = a7 <= b7; var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r3b3 = b3 <= a3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r3b4 = b4 <= a4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new () => C' and 'new () => Base'. var r3b5 = b5 <= a5; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r3b6 = b6 <= a6; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r3b7 = b7 <= a7; // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r4a3 = a3 >= b3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r4a4 = a4 >= b4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and 'new () => C'. var r4a5 = a5 >= b5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r4a6 = a6 >= b6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r4a7 = a7 >= b7; var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r4b3 = b3 >= a3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r4b4 = b4 >= a4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new () => C' and 'new () => Base'. var r4b5 = b5 >= a5; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r4b6 = b6 >= a6; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r4b7 = b7 >= a7; // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r5a3 = a3 == b3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r5a4 = a4 == b4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => Base' and 'new () => C'. var r5a5 = a5 == b5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r5a6 = a6 == b6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r5a7 = a7 == b7; var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r5b3 = b3 == a3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r5b4 = b4 == a4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new () => C' and 'new () => Base'. var r5b5 = b5 == a5; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r5b6 = b6 == a6; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r5b7 = b7 == a7; // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r6a3 = a3 != b3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r6a4 = a4 != b4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and 'new () => C'. var r6a5 = a5 != b5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r6a6 = a6 != b6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r6a7 = a7 != b7; var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r6b3 = b3 != a3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r6b4 = b4 != a4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new () => C' and 'new () => Base'. var r6b5 = b5 != a5; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r6b6 = b6 != a6; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r6b7 = b7 != a7; // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => Base' and 'new () => C'. var r7a5 = a5 === b5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r7a6 = a6 === b6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r7a7 = a7 === b7; var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new () => C' and 'new () => Base'. var r7b5 = b5 === a5; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r7b6 = b6 === a6; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r7b7 = b7 === a7; // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(): Base; }' and 'new () => Base'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: number, b: string) => Base' and 'new (a: string) => Base'. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: Base, b: string) => Base' and 'new (a: Derived, b: Base) => Base'. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => Base' and 'new () => C'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and 'new () => C'. var r8a5 = a5 !== b5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a?: Base) => Base' and 'new (a?: C) => Base'. var r8a6 = a6 !== b6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (...a: Base[]) => Base' and 'new (...a: C[]) => Base'. var r8a7 = a7 !== b7; var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => Base' and '{ fn(): Base; }'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: string) => Base' and 'new (a: number, b: string) => Base'. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a: Derived, b: Base) => Base' and 'new (a: Base, b: string) => Base'. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new () => C' and 'new () => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new () => C' and 'new () => Base'. var r8b5 = b5 !== a5; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (a?: C) => Base' and 'new (a?: Base) => Base'. var r8b6 = b6 !== a6; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (...a: C[]) => Base' and 'new (...a: Base[]) => Base'. var r8b7 = b7 !== a7; \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt index dda19ceaa1..c1044b604e 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.errors.txt @@ -26,215 +26,215 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r1a3 = a3 < b3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r1a4 = a4 < b4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r1b3 = b3 < a3; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r1b4 = b4 < a4; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r2a3 = a3 > b3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r2a4 = a4 > b4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r2b3 = b3 > a3; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r2b4 = b4 > a4; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r3a3 = a3 <= b3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r3a4 = a4 <= b4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r3b3 = b3 <= a3; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r3b4 = b4 <= a4; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r4a3 = a3 >= b3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r4a4 = a4 >= b4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r4b3 = b3 >= a3; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r4b4 = b4 >= a4; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r5a3 = a3 == b3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r5a4 = a4 == b4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r5b3 = b3 == a3; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r5b4 = b4 == a4; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r6a3 = a3 != b3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r6a4 = a4 != b4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r6b3 = b3 != a3; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r6b4 = b4 != a4; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r7a3 = a3 === b3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r7a4 = a4 === b4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r7b3 = b3 === a3; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r7b4 = b4 === a4; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'. var r8a3 = a3 !== b3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'. var r8a4 = a4 !== b4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'. var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'. var r8b3 = b3 !== a3; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'. var r8b4 = b4 !== a4; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt index 79da7a1389..8e94997307 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.errors.txt @@ -28,7 +28,7 @@ var a6: { fn(x: T, y: U): T }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b6: { fn(x: Base, y: C): Base }; // operator < diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt index 870a40fa0a..b4ed786ee2 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.errors.txt @@ -28,7 +28,7 @@ var a6: { new (x: T, y: U): T }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b6: { new (x: Base, y: C): Base }; // operator < diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt index fd3be68dee..685fe433ab 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.errors.txt @@ -13,63 +13,63 @@ // operator < var ra1 = a < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. var ra2 = b < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. // operator > var rb1 = a > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. var rb2 = b > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. // operator <= var rc1 = a <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. var rc2 = b <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. // operator >= var rd1 = a >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. var rd2 = b >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. // operator == var re1 = a == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '==' cannot be applied to types 'A1' and 'B1'. var re2 = b == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '==' cannot be applied to types 'B1' and 'A1'. // operator != var rf1 = a != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'A1' and 'B1'. var rf2 = b != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'B1' and 'A1'. // operator === var rg1 = a === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '===' cannot be applied to types 'A1' and 'B1'. var rg2 = b === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '===' cannot be applied to types 'B1' and 'A1'. // operator !== var rh1 = a !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!==' cannot be applied to types 'A1' and 'B1'. var rh2 = b !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'B1' and 'A1'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types 'B1' and 'A1'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt index c8d6dd24fa..e62f352e84 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipObjectsOnProperty.errors.txt @@ -23,119 +23,119 @@ // operator < var r1a1 = a1 < b1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<' cannot be applied to types 'A1' and 'B1'. var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '<' cannot be applied to types 'A2' and 'B2'. var r1b1 = b1 < a1; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<' cannot be applied to types 'B1' and 'A1'. var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '<' cannot be applied to types 'B2' and 'A2'. // operator > var r2a1 = a1 > b1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>' cannot be applied to types 'A1' and 'B1'. var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '>' cannot be applied to types 'A2' and 'B2'. var r2b1 = b1 > a1; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>' cannot be applied to types 'B1' and 'A1'. var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '>' cannot be applied to types 'B2' and 'A2'. // operator <= var r3a1 = a1 <= b1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'A1' and 'B1'. var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '<=' cannot be applied to types 'A2' and 'B2'. var r3b1 = b1 <= a1; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '<=' cannot be applied to types 'B1' and 'A1'. var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '<=' cannot be applied to types 'B2' and 'A2'. // operator >= var r4a1 = a1 >= b1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'A1' and 'B1'. var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '>=' cannot be applied to types 'A2' and 'B2'. var r4b1 = b1 >= a1; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '>=' cannot be applied to types 'B1' and 'A1'. var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '>=' cannot be applied to types 'B2' and 'A2'. // operator == var r5a1 = a1 == b1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '==' cannot be applied to types 'A1' and 'B1'. var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '==' cannot be applied to types 'A2' and 'B2'. var r5b1 = b1 == a1; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '==' cannot be applied to types 'B1' and 'A1'. var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '==' cannot be applied to types 'B2' and 'A2'. // operator != var r6a1 = a1 != b1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'A1' and 'B1'. var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '!=' cannot be applied to types 'A2' and 'B2'. var r6b1 = b1 != a1; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '!=' cannot be applied to types 'B1' and 'A1'. var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '!=' cannot be applied to types 'B2' and 'A2'. // operator === var r7a1 = a1 === b1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '===' cannot be applied to types 'A1' and 'B1'. var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '===' cannot be applied to types 'A2' and 'B2'. var r7b1 = b1 === a1; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '===' cannot be applied to types 'B1' and 'A1'. var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'B2' and 'A2'. +!!! error TS2365: Operator '===' cannot be applied to types 'B2' and 'A2'. // operator !== var r8a1 = a1 !== b1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'A1' and 'B1'. +!!! error TS2365: Operator '!==' cannot be applied to types 'A1' and 'B1'. var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'A2' and 'B2'. +!!! error TS2365: Operator '!==' cannot be applied to types 'A2' and 'B2'. var r8b1 = b1 !== a1; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'B1' and 'A1'. +!!! error TS2365: Operator '!==' cannot be applied to types 'B1' and 'A1'. var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'B2' and 'A2'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types 'B2' and 'A2'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt index d614662c0a..34dfb5fcf0 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipPrimitiveType.errors.txt @@ -10,495 +10,495 @@ // operator < var r1a1 = a < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'boolean'. var r1a1 = a < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'string'. var r1a1 = a < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'void'. var r1a1 = a < e; // no error, expected var r1b1 = b < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'number'. var r1b1 = b < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'string'. var r1b1 = b < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'void'. var r1b1 = b < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'E'. var r1c1 = c < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'number'. var r1c1 = c < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'boolean'. var r1c1 = c < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'void'. var r1c1 = c < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'E'. var r1d1 = d < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'number'. var r1d1 = d < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'boolean'. var r1d1 = d < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'string'. var r1d1 = d < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'E'. var r1e1 = e < a; // no error, expected var r1e1 = e < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'boolean'. var r1e1 = e < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'string'. var r1e1 = e < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'void'. // operator > var r2a1 = a > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'boolean'. var r2a1 = a > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'string'. var r2a1 = a > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'number' and 'void'. var r2a1 = a > e; // no error, expected var r2b1 = b > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'. var r2b1 = b > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'string'. var r2b1 = b > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'void'. var r2b1 = b > e; ~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'E'. var r2c1 = c > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'number'. var r2c1 = c > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'boolean'. var r2c1 = c > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'void'. var r2c1 = c > e; ~~~~~ -!!! Operator '>' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '>' cannot be applied to types 'string' and 'E'. var r2d1 = d > a; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'number'. var r2d1 = d > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'boolean'. var r2d1 = d > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'string'. var r2d1 = d > e; ~~~~~ -!!! Operator '>' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '>' cannot be applied to types 'void' and 'E'. var r2e1 = e > a; // no error, expected var r2e1 = e > b; ~~~~~ -!!! Operator '>' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '>' cannot be applied to types 'E' and 'boolean'. var r2e1 = e > c; ~~~~~ -!!! Operator '>' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '>' cannot be applied to types 'E' and 'string'. var r2e1 = e > d; ~~~~~ -!!! Operator '>' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'E' and 'void'. // operator <= var r3a1 = a <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'number' and 'boolean'. var r3a1 = a <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'number' and 'string'. var r3a1 = a <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'number' and 'void'. var r3a1 = a <= e; // no error, expected var r3b1 = b <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'number'. var r3b1 = b <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'string'. var r3b1 = b <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'void'. var r3b1 = b <= e; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'E'. var r3c1 = c <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'number'. var r3c1 = c <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'boolean'. var r3c1 = c <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'void'. var r3c1 = c <= e; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '<=' cannot be applied to types 'string' and 'E'. var r3d1 = d <= a; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'number'. var r3d1 = d <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'boolean'. var r3d1 = d <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'string'. var r3d1 = d <= e; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '<=' cannot be applied to types 'void' and 'E'. var r3e1 = e <= a; // no error, expected var r3e1 = e <= b; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '<=' cannot be applied to types 'E' and 'boolean'. var r3e1 = e <= c; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'E' and 'string'. var r3e1 = e <= d; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '<=' cannot be applied to types 'E' and 'void'. // operator >= var r4a1 = a >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'number' and 'boolean'. var r4a1 = a >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'number' and 'string'. var r4a1 = a >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'number' and 'void'. var r4a1 = a >= e; // no error, expected var r4b1 = b >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'number'. var r4b1 = b >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'string'. var r4b1 = b >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'void'. var r4b1 = b >= e; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'E'. var r4c1 = c >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'number'. var r4c1 = c >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'boolean'. var r4c1 = c >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'void'. var r4c1 = c >= e; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '>=' cannot be applied to types 'string' and 'E'. var r4d1 = d >= a; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'number'. var r4d1 = d >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'boolean'. var r4d1 = d >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'string'. var r4d1 = d >= e; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '>=' cannot be applied to types 'void' and 'E'. var r4e1 = e >= a; // no error, expected var r4e1 = e >= b; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '>=' cannot be applied to types 'E' and 'boolean'. var r4e1 = e >= c; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'E' and 'string'. var r4e1 = e >= d; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '>=' cannot be applied to types 'E' and 'void'. // operator == var r5a1 = a == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'boolean'. var r5a1 = a == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'string'. var r5a1 = a == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'void'. var r5a1 = a == e; // no error, expected var r5b1 = b == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'number'. var r5b1 = b == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'string'. var r5b1 = b == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'void'. var r5b1 = b == e; ~~~~~~ -!!! Operator '==' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'boolean' and 'E'. var r5c1 = c == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'number'. var r5c1 = c == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'boolean'. var r5c1 = c == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'void'. var r5c1 = c == e; ~~~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'E'. var r5d1 = d == a; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'number'. var r5d1 = d == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'boolean'. var r5d1 = d == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'string'. var r5d1 = d == e; ~~~~~~ -!!! Operator '==' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'void' and 'E'. var r5e1 = e == a; // no error, expected var r5e1 = e == b; ~~~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'boolean'. var r5e1 = e == c; ~~~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'string'. var r5e1 = e == d; ~~~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'void'. // operator != var r6a1 = a != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'number' and 'boolean'. var r6a1 = a != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'number' and 'string'. var r6a1 = a != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'number' and 'void'. var r6a1 = a != e; // no error, expected var r6b1 = b != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'number'. var r6b1 = b != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'string'. var r6b1 = b != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'void'. var r6b1 = b != e; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '!=' cannot be applied to types 'boolean' and 'E'. var r6c1 = c != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'number'. var r6c1 = c != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'boolean'. var r6c1 = c != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'void'. var r6c1 = c != e; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '!=' cannot be applied to types 'string' and 'E'. var r6d1 = d != a; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'number'. var r6d1 = d != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'boolean'. var r6d1 = d != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'string'. var r6d1 = d != e; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '!=' cannot be applied to types 'void' and 'E'. var r6e1 = e != a; // no error, expected var r6e1 = e != b; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '!=' cannot be applied to types 'E' and 'boolean'. var r6e1 = e != c; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'E' and 'string'. var r6e1 = e != d; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '!=' cannot be applied to types 'E' and 'void'. // operator === var r7a1 = a === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'number' and 'boolean'. var r7a1 = a === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'number' and 'string'. var r7a1 = a === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'number' and 'void'. var r7a1 = a === e; // no error, expected var r7b1 = b === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'number'. var r7b1 = b === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'string'. var r7b1 = b === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'void'. var r7b1 = b === e; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '===' cannot be applied to types 'boolean' and 'E'. var r7c1 = c === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'number'. var r7c1 = c === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'boolean'. var r7c1 = c === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'void'. var r7c1 = c === e; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'E'. var r7d1 = d === a; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'number'. var r7d1 = d === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'boolean'. var r7d1 = d === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'string'. var r7d1 = d === e; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '===' cannot be applied to types 'void' and 'E'. var r7e1 = e === a; // no error, expected var r7e1 = e === b; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '===' cannot be applied to types 'E' and 'boolean'. var r7e1 = e === c; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '===' cannot be applied to types 'E' and 'string'. var r7e1 = e === d; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '===' cannot be applied to types 'E' and 'void'. // operator !== var r8a1 = a !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'number' and 'boolean'. var r8a1 = a !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'number' and 'string'. var r8a1 = a !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '!==' cannot be applied to types 'number' and 'void'. var r8a1 = a !== e; // no error, expected var r8b1 = b !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'number'. var r8b1 = b !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'string'. var r8b1 = b !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'void'. var r8b1 = b !== e; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '!==' cannot be applied to types 'boolean' and 'E'. var r8c1 = c !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'number'. var r8c1 = c !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'boolean'. var r8c1 = c !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'void'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'void'. var r8c1 = c !== e; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '!==' cannot be applied to types 'string' and 'E'. var r8d1 = d !== a; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'number'. var r8d1 = d !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'boolean'. var r8d1 = d !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'string'. var r8d1 = d !== e; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '!==' cannot be applied to types 'void' and 'E'. var r8e1 = e !== a; // no error, expected var r8e1 = e !== b; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '!==' cannot be applied to types 'E' and 'boolean'. var r8e1 = e !== c; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'E' and 'string'. var r8e1 = e !== d; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'E' and 'void'. \ No newline at end of file +!!! error TS2365: Operator '!==' cannot be applied to types 'E' and 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt index 6114521d63..57a847256c 100644 --- a/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithNoRelationshipTypeParameter.errors.txt @@ -12,386 +12,386 @@ function foo(t: T, u: U) { var r1 = t < u; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'U'. var r2 = t > u; ~~~~~ -!!! Operator '>' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'U'. var r3 = t <= u; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'U'. var r4 = t >= u; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. var r5 = t == u; ~~~~~~ -!!! Operator '==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '==' cannot be applied to types 'T' and 'U'. var r6 = t != u; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!=' cannot be applied to types 'T' and 'U'. var r7 = t === u; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '===' cannot be applied to types 'T' and 'U'. var r8 = t !== u; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!==' cannot be applied to types 'T' and 'U'. // operator < var r1a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r1a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r1a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r1a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r1a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r1a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r1a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r1b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r1b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r1b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r1b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r1b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r1b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r1b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator > var r2a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r2a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r2a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r2a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r2a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r2a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r2a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r2b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r2b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r2b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r2b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r2b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r2b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r2b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator <= var r3a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r3a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r3a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r3a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r3a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r3a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r3a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r3b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r3b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r3b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r3b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r3b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r3b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r3b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator >= var r4a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r4a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r4a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r4a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r4a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r4a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r4a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r4b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r4b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r4b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r4b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r4b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r4b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r4b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator == var r5a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r5a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r5a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r5a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r5a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r5a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r5a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r5b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r5b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r5b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r5b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r5b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r5b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r5b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator != var r6a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r6a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r6a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r6a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r6a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r6a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r6a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r6b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r6b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r6b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r6b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r6b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r6b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r6b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator === var r7a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r7a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r7a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r7a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r7a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r7a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r7a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r7b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r7b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r7b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r7b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r7b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r7b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r7b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. // operator !== var r8a1 = t < a; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'boolean'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'boolean'. var r8a2 = t < b; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'number'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'number'. var r8a3 = t < c; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'string'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'string'. var r8a4 = t < d; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'void'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'void'. var r8a5 = t < e; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'E'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'E'. var r8a6 = t < f; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and '{ a: string; }'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and '{ a: string; }'. var r8a7 = t < g; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'any[]'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'any[]'. var r8b1 = a < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'boolean' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'boolean' and 'T'. var r8b2 = b < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'number' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'number' and 'T'. var r8b3 = c < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'string' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'T'. var r8b4 = d < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'void' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'void' and 'T'. var r8b5 = e < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'E' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'E' and 'T'. var r8b6 = f < t; ~~~~~ -!!! Operator '<' cannot be applied to types '{ a: string; }' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types '{ a: string; }' and 'T'. var r8b7 = g < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'any[]' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'any[]' and 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt index 33fcc439e0..cae616d233 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.errors.txt @@ -32,7 +32,7 @@ var r1a1 = a1 < b1; var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r1a3 = a3 < b3; var r1a4 = a4 < b4; var r1a5 = a5 < b5; @@ -42,7 +42,7 @@ var r1b1 = b1 < a1; var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '<' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r1b3 = b3 < a3; var r1b4 = b4 < a4; var r1b5 = b5 < a5; @@ -53,7 +53,7 @@ var r2a1 = a1 > b1; var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r2a3 = a3 > b3; var r2a4 = a4 > b4; var r2a5 = a5 > b5; @@ -63,7 +63,7 @@ var r2b1 = b1 > a1; var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '>' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r2b3 = b3 > a3; var r2b4 = b4 > a4; var r2b5 = b5 > a5; @@ -74,7 +74,7 @@ var r3a1 = a1 <= b1; var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r3a3 = a3 <= b3; var r3a4 = a4 <= b4; var r3a5 = a5 <= b5; @@ -84,7 +84,7 @@ var r3b1 = b1 <= a1; var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '<=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r3b3 = b3 <= a3; var r3b4 = b4 <= a4; var r3b5 = b5 <= a5; @@ -95,7 +95,7 @@ var r4a1 = a1 >= b1; var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r4a3 = a3 >= b3; var r4a4 = a4 >= b4; var r4a5 = a5 >= b5; @@ -105,7 +105,7 @@ var r4b1 = b1 >= a1; var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '>=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r4b3 = b3 >= a3; var r4b4 = b4 >= a4; var r4b5 = b5 >= a5; @@ -116,7 +116,7 @@ var r5a1 = a1 == b1; var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r5a3 = a3 == b3; var r5a4 = a4 == b4; var r5a5 = a5 == b5; @@ -126,7 +126,7 @@ var r5b1 = b1 == a1; var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r5b3 = b3 == a3; var r5b4 = b4 == a4; var r5b5 = b5 == a5; @@ -137,7 +137,7 @@ var r6a1 = a1 != b1; var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r6a3 = a3 != b3; var r6a4 = a4 != b4; var r6a5 = a5 != b5; @@ -147,7 +147,7 @@ var r6b1 = b1 != a1; var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '!=' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r6b3 = b3 != a3; var r6b4 = b4 != a4; var r6b5 = b5 != a5; @@ -158,7 +158,7 @@ var r7a1 = a1 === b1; var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r7a3 = a3 === b3; var r7a4 = a4 === b4; var r7a5 = a5 === b5; @@ -168,7 +168,7 @@ var r7b1 = b1 === a1; var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '===' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r7b3 = b3 === a3; var r7b4 = b4 === a4; var r7b5 = b5 === a5; @@ -179,7 +179,7 @@ var r8a1 = a1 !== b1; var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(x: T): T; }' and '{ fn(x: string, y: number): string; }'. var r8a3 = a3 !== b3; var r8a4 = a4 !== b4; var r8a5 = a5 !== b5; @@ -189,7 +189,7 @@ var r8b1 = b1 !== a1; var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. +!!! error TS2365: Operator '!==' cannot be applied to types '{ fn(x: string, y: number): string; }' and '{ fn(x: T): T; }'. var r8b3 = b3 !== a3; var r8b4 = b4 !== a4; var r8b5 = b5 !== a5; diff --git a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt index 573322f8d6..1d027e511c 100644 --- a/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.errors.txt @@ -32,7 +32,7 @@ var r1a1 = a1 < b1; var r1a2 = a2 < b2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r1a3 = a3 < b3; var r1a4 = a4 < b4; var r1a5 = a5 < b5; @@ -42,7 +42,7 @@ var r1b1 = b1 < a1; var r1b2 = b2 < a2; ~~~~~~~ -!!! Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '<' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r1b3 = b3 < a3; var r1b4 = b4 < a4; var r1b5 = b5 < a5; @@ -53,7 +53,7 @@ var r2a1 = a1 > b1; var r2a2 = a2 > b2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r2a3 = a3 > b3; var r2a4 = a4 > b4; var r2a5 = a5 > b5; @@ -63,7 +63,7 @@ var r2b1 = b1 > a1; var r2b2 = b2 > a2; ~~~~~~~ -!!! Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '>' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r2b3 = b3 > a3; var r2b4 = b4 > a4; var r2b5 = b5 > a5; @@ -74,7 +74,7 @@ var r3a1 = a1 <= b1; var r3a2 = a2 <= b2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r3a3 = a3 <= b3; var r3a4 = a4 <= b4; var r3a5 = a5 <= b5; @@ -84,7 +84,7 @@ var r3b1 = b1 <= a1; var r3b2 = b2 <= a2; ~~~~~~~~ -!!! Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '<=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r3b3 = b3 <= a3; var r3b4 = b4 <= a4; var r3b5 = b5 <= a5; @@ -95,7 +95,7 @@ var r4a1 = a1 >= b1; var r4a2 = a2 >= b2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r4a3 = a3 >= b3; var r4a4 = a4 >= b4; var r4a5 = a5 >= b5; @@ -105,7 +105,7 @@ var r4b1 = b1 >= a1; var r4b2 = b2 >= a2; ~~~~~~~~ -!!! Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '>=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r4b3 = b3 >= a3; var r4b4 = b4 >= a4; var r4b5 = b5 >= a5; @@ -116,7 +116,7 @@ var r5a1 = a1 == b1; var r5a2 = a2 == b2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r5a3 = a3 == b3; var r5a4 = a4 == b4; var r5a5 = a5 == b5; @@ -126,7 +126,7 @@ var r5b1 = b1 == a1; var r5b2 = b2 == a2; ~~~~~~~~ -!!! Operator '==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r5b3 = b3 == a3; var r5b4 = b4 == a4; var r5b5 = b5 == a5; @@ -137,7 +137,7 @@ var r6a1 = a1 != b1; var r6a2 = a2 != b2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r6a3 = a3 != b3; var r6a4 = a4 != b4; var r6a5 = a5 != b5; @@ -147,7 +147,7 @@ var r6b1 = b1 != a1; var r6b2 = b2 != a2; ~~~~~~~~ -!!! Operator '!=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '!=' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r6b3 = b3 != a3; var r6b4 = b4 != a4; var r6b5 = b5 != a5; @@ -158,7 +158,7 @@ var r7a1 = a1 === b1; var r7a2 = a2 === b2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r7a3 = a3 === b3; var r7a4 = a4 === b4; var r7a5 = a5 === b5; @@ -168,7 +168,7 @@ var r7b1 = b1 === a1; var r7b2 = b2 === a2; ~~~~~~~~~ -!!! Operator '===' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '===' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r7b3 = b3 === a3; var r7b4 = b4 === a4; var r7b5 = b5 === a5; @@ -179,7 +179,7 @@ var r8a1 = a1 !== b1; var r8a2 = a2 !== b2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (x: T) => T' and 'new (x: string, y: number) => string'. var r8a3 = a3 !== b3; var r8a4 = a4 !== b4; var r8a5 = a5 !== b5; @@ -189,7 +189,7 @@ var r8b1 = b1 !== a1; var r8b2 = b2 !== a2; ~~~~~~~~~ -!!! Operator '!==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. +!!! error TS2365: Operator '!==' cannot be applied to types 'new (x: string, y: number) => string' and 'new (x: T) => T'. var r8b3 = b3 !== a3; var r8b4 = b4 !== a4; var r8b5 = b5 !== a5; diff --git a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt index 139efbbfc9..8a123576f6 100644 --- a/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt +++ b/tests/baselines/reference/comparisonOperatorWithTypeParameter.errors.txt @@ -6,103 +6,103 @@ // errors var ra1 = t < u; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'U'. var ra2 = t > u; ~~~~~ -!!! Operator '>' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'U'. var ra3 = t <= u; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'U'. var ra4 = t >= u; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'U'. var ra5 = t == u; ~~~~~~ -!!! Operator '==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '==' cannot be applied to types 'T' and 'U'. var ra6 = t != u; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!=' cannot be applied to types 'T' and 'U'. var ra7 = t === u; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '===' cannot be applied to types 'T' and 'U'. var ra8 = t !== u; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'T' and 'U'. +!!! error TS2365: Operator '!==' cannot be applied to types 'T' and 'U'. var rb1 = u < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'U' and 'T'. var rb2 = u > t; ~~~~~ -!!! Operator '>' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '>' cannot be applied to types 'U' and 'T'. var rb3 = u <= t; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '<=' cannot be applied to types 'U' and 'T'. var rb4 = u >= t; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '>=' cannot be applied to types 'U' and 'T'. var rb5 = u == t; ~~~~~~ -!!! Operator '==' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '==' cannot be applied to types 'U' and 'T'. var rb6 = u != t; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '!=' cannot be applied to types 'U' and 'T'. var rb7 = u === t; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '===' cannot be applied to types 'U' and 'T'. var rb8 = u !== t; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'U' and 'T'. +!!! error TS2365: Operator '!==' cannot be applied to types 'U' and 'T'. var rc1 = t < v; ~~~~~ -!!! Operator '<' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '<' cannot be applied to types 'T' and 'V'. var rc2 = t > v; ~~~~~ -!!! Operator '>' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '>' cannot be applied to types 'T' and 'V'. var rc3 = t <= v; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '<=' cannot be applied to types 'T' and 'V'. var rc4 = t >= v; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '>=' cannot be applied to types 'T' and 'V'. var rc5 = t == v; ~~~~~~ -!!! Operator '==' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '==' cannot be applied to types 'T' and 'V'. var rc6 = t != v; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '!=' cannot be applied to types 'T' and 'V'. var rc7 = t === v; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '===' cannot be applied to types 'T' and 'V'. var rc8 = t !== v; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'T' and 'V'. +!!! error TS2365: Operator '!==' cannot be applied to types 'T' and 'V'. var rd1 = v < t; ~~~~~ -!!! Operator '<' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '<' cannot be applied to types 'V' and 'T'. var rd2 = v > t; ~~~~~ -!!! Operator '>' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '>' cannot be applied to types 'V' and 'T'. var rd3 = v <= t; ~~~~~~ -!!! Operator '<=' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '<=' cannot be applied to types 'V' and 'T'. var rd4 = v >= t; ~~~~~~ -!!! Operator '>=' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '>=' cannot be applied to types 'V' and 'T'. var rd5 = v == t; ~~~~~~ -!!! Operator '==' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '==' cannot be applied to types 'V' and 'T'. var rd6 = v != t; ~~~~~~ -!!! Operator '!=' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '!=' cannot be applied to types 'V' and 'T'. var rd7 = v === t; ~~~~~~~ -!!! Operator '===' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '===' cannot be applied to types 'V' and 'T'. var rd8 = v !== t; ~~~~~~~ -!!! Operator '!==' cannot be applied to types 'V' and 'T'. +!!! error TS2365: Operator '!==' cannot be applied to types 'V' and 'T'. // ok var re1 = t < a; diff --git a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt index 3aa94844f1..86fc8857d3 100644 --- a/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt +++ b/tests/baselines/reference/complicatedGenericRecursiveBaseClassReference.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/complicatedGenericRecursiveBaseClassReference.ts (2 errors) ==== class S18 extends S18 ~~~ -!!! Type 'S18' recursively references itself as a base type. +!!! error TS2310: Type 'S18' recursively references itself as a base type. { } (new S18(123)).S18 = 0; ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/complicatedPrivacy.errors.txt b/tests/baselines/reference/complicatedPrivacy.errors.txt index 443fefd948..0223f26bc3 100644 --- a/tests/baselines/reference/complicatedPrivacy.errors.txt +++ b/tests/baselines/reference/complicatedPrivacy.errors.txt @@ -11,7 +11,7 @@ export class C2 implements m3.i3 { public get p1(arg) { ~~ -!!! A 'get' accessor cannot have parameters. +!!! error TS1054: A 'get' accessor cannot have parameters. return new C1(); } @@ -26,7 +26,7 @@ export function f2(arg1: { x?: C1, y: number }) { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } export function f3(): { @@ -39,7 +39,7 @@ { [number]: C1; ~~~~~~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. }) { } @@ -79,7 +79,7 @@ export class c_pr implements mglo5.i5, mglo5.i6 { ~~~~~~~~ -!!! Module 'mglo5' has no exported member 'i6'. +!!! error TS2305: Module 'mglo5' has no exported member 'i6'. f1() { return "Hello"; } diff --git a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt index 6313e08471..058e94a22f 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentLHSCannotBeAssigned.errors.txt @@ -5,25 +5,25 @@ var x1: boolean; x1 += ''; ~~ -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2323: Type 'string' is not assignable to type 'boolean'. var x2: number; x2 += ''; ~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. var x3: E; x3 += ''; ~~ -!!! Type 'string' is not assignable to type 'E'. +!!! error TS2323: Type 'string' is not assignable to type 'E'. var x4: {a: string}; x4 += ''; ~~ -!!! Type 'string' is not assignable to type '{ a: string; }': -!!! Property 'a' is missing in type 'String'. +!!! error TS2322: Type 'string' is not assignable to type '{ a: string; }': +!!! error TS2322: Property 'a' is missing in type 'String'. var x5: void; x5 += ''; ~~ -!!! Type 'string' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt b/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt index d7a4cca8e9..385ab39d81 100644 --- a/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/compoundAdditionAssignmentWithInvalidOperands.errors.txt @@ -6,90 +6,90 @@ var x1: boolean; x1 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'void'. x1 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. x1 += 0; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'number'. x1 += E.a; ~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'E'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'E'. x1 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and '{}'. x1 += null; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. x1 += undefined; ~~~~~~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'boolean' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'boolean' and 'boolean'. var x2: {}; x2 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'void'. x2 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'boolean'. x2 += 0; ~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'number'. x2 += E.a; ~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and 'E'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and 'E'. x2 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. x2 += null; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. x2 += undefined; ~~~~~~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types '{}' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types '{}' and '{}'. var x3: void; x3 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. x3 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'boolean'. x3 += 0; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'number'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'number'. x3 += E.a; ~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'E'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'E'. x3 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and '{}'. x3 += null; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. x3 += undefined; ~~~~~~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'void' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'void' and 'void'. var x4: number; x4 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'number' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. x4 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'boolean'. x4 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'number' and '{}'. +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and '{}'. var x5: E; x5 += a; ~~~~~~~ -!!! Operator '+=' cannot be applied to types 'E' and 'void'. +!!! error TS2365: Operator '+=' cannot be applied to types 'E' and 'void'. x5 += true; ~~~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '+=' cannot be applied to types 'E' and 'boolean'. x5 += {}; ~~~~~~~~ -!!! Operator '+=' cannot be applied to types 'E' and '{}'. \ No newline at end of file +!!! error TS2365: Operator '+=' cannot be applied to types 'E' and '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt b/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt index d0045d92aa..b21215f915 100644 --- a/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/compoundArithmeticAssignmentWithInvalidOperands.errors.txt @@ -7,191 +7,191 @@ var x1: boolean; x1 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x1 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x2: string; x2 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x2 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x3: {}; x3 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x3 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x4: void; x4 *= a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= b; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= true; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= 0; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= '' ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= E.a; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= {}; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= null; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x4 *= undefined; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x5: number; x5 *= b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x5 *= true; ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x5 *= '' ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x5 *= {}; ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var x6: E; x6 *= b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x6 *= true; ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x6 *= '' ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. x6 *= {}; ~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt index 7fe036ef08..f09a4ffa63 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.errors.txt @@ -7,129 +7,129 @@ constructor() { this *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } foo() { this *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } static sfoo() { this *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } } function foo() { this *= value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } this *= value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. this += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // identifiers: module, class, enum, function module M { export var a; } M *= value; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. M += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. C *= value; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. C += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. enum E { } E *= value; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. E += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. foo *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. foo += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // literals null *= value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. null += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. true *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. true += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. false *= value; ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. false += value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. 0 *= value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. 0 += value; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. '' *= value; ~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. '' += value; ~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. /d+/ *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. /d+/ += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // object literals { a: 0} *= value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. { a: 0} += value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. // array literals ['', ''] *= value; ~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ['', ''] += value; ~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // super class Derived extends C { @@ -137,147 +137,147 @@ super(); super *= value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. super += value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } foo() { super *= value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. super += value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } static sfoo() { super *= value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. super += value; ~~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. } } // function expression function bar1() { } *= value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. function bar2() { } += value; ~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. () => { } *= value; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. () => { } += value; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. // function calls foo() *= value; ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. foo() += value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. // parentheses, the containted expression is value (this) *= value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (this) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (M) *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (M) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (C) *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (C) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (E) *= value; ~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (E) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo) *= value; ~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (foo) += value; ~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (null) *= value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (null) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (true) *= value; ~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (true) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (0) *= value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (0) += value; ~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ('') *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ('') += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (/d+/) *= value; ~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (/d+/) += value; ~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ({}) *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ({}) += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. ([]) *= value; ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ([]) += value; ~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (function baz1() { }) *= value; ~~~~~~~~~~~~~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (function baz2() { }) += value; ~~~~~~~~~~~~~~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. (foo()) *= value; ~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. (foo()) += value; ~~~~~~~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/concatClassAndString.errors.txt b/tests/baselines/reference/concatClassAndString.errors.txt index e97ff01d75..45d27291d2 100644 --- a/tests/baselines/reference/concatClassAndString.errors.txt +++ b/tests/baselines/reference/concatClassAndString.errors.txt @@ -4,5 +4,5 @@ f += ''; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalExpression1.errors.txt b/tests/baselines/reference/conditionalExpression1.errors.txt index 0ae4814113..57f953db44 100644 --- a/tests/baselines/reference/conditionalExpression1.errors.txt +++ b/tests/baselines/reference/conditionalExpression1.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/conditionalExpression1.ts (2 errors) ==== var x: boolean = (true ? 1 : ""); // should be an error ~ -!!! Type '{}' is not assignable to type 'boolean'. +!!! error TS2323: Type '{}' is not assignable to type 'boolean'. ~~~~~~~~~~~~~ -!!! No best common type exists between 'number' and 'string'. \ No newline at end of file +!!! error TS2367: No best common type exists between 'number' and 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt index 4a34e042b1..359dc56130 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.errors.txt @@ -12,37 +12,37 @@ //Be not contextually typed true ? a : b; ~~~~~~~~~~~~ -!!! No best common type exists between 'A' and 'B'. +!!! error TS2367: No best common type exists between 'A' and 'B'. var result1 = true ? a : b; ~~~~~~~~~~~~ -!!! No best common type exists between 'A' and 'B'. +!!! error TS2367: No best common type exists between 'A' and 'B'. //Be contextually typed and and bct is not identical var result2: A = true ? a : b; ~~~~~~~ -!!! Type '{}' is not assignable to type 'A': -!!! Property 'propertyA' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'A': +!!! error TS2322: Property 'propertyA' is missing in type '{}'. ~~~~~~~~~~~~ -!!! No best common type exists between 'A', 'A', and 'B'. +!!! error TS2366: No best common type exists between 'A', 'A', and 'B'. var result3: B = true ? a : b; ~~~~~~~ -!!! Type '{}' is not assignable to type 'B': -!!! Property 'propertyB' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'B': +!!! error TS2322: Property 'propertyB' is missing in type '{}'. ~~~~~~~~~~~~ -!!! No best common type exists between 'B', 'A', and 'B'. +!!! error TS2366: No best common type exists between 'B', 'A', and 'B'. var result4: (t: X) => number = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! Type '{}' is not assignable to type '(t: X) => number'. +!!! error TS2323: Type '{}' is not assignable to type '(t: X) => number'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(t: X) => number', '(m: X) => number', and '(n: X) => string'. +!!! error TS2366: No best common type exists between '(t: X) => number', '(m: X) => number', and '(n: X) => string'. var result5: (t: X) => string = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! Type '{}' is not assignable to type '(t: X) => string'. +!!! error TS2323: Type '{}' is not assignable to type '(t: X) => string'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(t: X) => string', '(m: X) => number', and '(n: X) => string'. +!!! error TS2366: No best common type exists between '(t: X) => string', '(m: X) => number', and '(n: X) => string'. var result6: (t: X) => boolean = true ? (m) => m.propertyX1 : (n) => n.propertyX2; ~~~~~~~ -!!! Type '{}' is not assignable to type '(t: X) => boolean'. +!!! error TS2323: Type '{}' is not assignable to type '(t: X) => boolean'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(t: X) => boolean', '(m: X) => number', and '(n: X) => string'. \ No newline at end of file +!!! error TS2366: No best common type exists between '(t: X) => boolean', '(m: X) => number', and '(n: X) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt b/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt index 9bf1480f8b..a30d995216 100644 --- a/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt +++ b/tests/baselines/reference/conflictingMemberTypesInBases.errors.txt @@ -12,7 +12,7 @@ interface E extends B { } // Error here for extending B and D ~ -!!! Interface 'E' cannot simultaneously extend types 'B' and 'D': -!!! Named properties 'm' of types 'B' and 'D' are not identical. +!!! error TS2320: Interface 'E' cannot simultaneously extend types 'B' and 'D': +!!! error TS2320: Named properties 'm' of types 'B' and 'D' are not identical. interface E extends D { } // No duplicate error here \ No newline at end of file diff --git a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt index 6bb45b67ee..61cda3ee6e 100644 --- a/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt +++ b/tests/baselines/reference/conflictingTypeAnnotatedVar.errors.txt @@ -2,11 +2,11 @@ var foo: string; function foo(): number { } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. function foo(): number { } ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt index 3501f1b79b..8e25df2d2f 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.errors.txt @@ -6,13 +6,13 @@ function foo(tagName: 'canvas'): Derived3; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: 'div'): Derived2; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: 'span'): Derived1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(tagName: number): Base; function foo(tagName: any): Base { diff --git a/tests/baselines/reference/constraintErrors1.errors.txt b/tests/baselines/reference/constraintErrors1.errors.txt index f081959d02..1a3e4bdc23 100644 --- a/tests/baselines/reference/constraintErrors1.errors.txt +++ b/tests/baselines/reference/constraintErrors1.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/constraintErrors1.ts (1 errors) ==== function foo5(test: T) { } ~~ -!!! Cannot find name 'hm'. \ No newline at end of file +!!! error TS2304: Cannot find name 'hm'. \ No newline at end of file diff --git a/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt b/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt index 09a54bb89e..173c0d4e63 100644 --- a/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt +++ b/tests/baselines/reference/constraintReferencingTypeParameterFromSameTypeParameterList.errors.txt @@ -5,21 +5,21 @@ } function f>() { ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I1> { // Error, any does not satisfy the constraint I1 ~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I2 { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I4 T> { ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } // No error @@ -29,9 +29,9 @@ function foo(v: V) => void>() { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } \ No newline at end of file diff --git a/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt b/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt index c3f3b04a44..c7a2a8d6d8 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt +++ b/tests/baselines/reference/constraintSatisfactionWithAny2.errors.txt @@ -4,7 +4,7 @@ declare function foo(x: U) => Z>(y: T): Z; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var a: any; foo(a); diff --git a/tests/baselines/reference/constraints0.errors.txt b/tests/baselines/reference/constraints0.errors.txt index 1ace0a1b18..d7e0a7b186 100644 --- a/tests/baselines/reference/constraints0.errors.txt +++ b/tests/baselines/reference/constraints0.errors.txt @@ -14,7 +14,7 @@ var v1: C; // should work var v2: C; // should not work ~~~~ -!!! Type 'B' does not satisfy the constraint 'A': -!!! Property 'a' is missing in type 'B'. +!!! error TS2343: Type 'B' does not satisfy the constraint 'A': +!!! error TS2343: Property 'a' is missing in type 'B'. var y = v1.x.a; // 'a' should be of type 'number' \ No newline at end of file diff --git a/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt b/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt index 13b6be52ae..2363c86e80 100644 --- a/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt +++ b/tests/baselines/reference/constraintsThatReferenceOtherContstraints1.errors.txt @@ -3,10 +3,10 @@ class Foo { } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. class Bar { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. data: Foo; // Error 1 Type 'Object' does not satisfy the constraint 'T' for type parameter 'U extends T'. } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt index e33107575e..0e502320cb 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance.errors.txt @@ -61,10 +61,10 @@ // S's interface I2 extends Base2 { ~~ -!!! Interface 'I2' incorrectly extends interface 'Base2': -!!! Types of property 'a' are incompatible: -!!! Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'new (x: number) => string' is not assignable to type 'new (x: number) => number': +!!! error TS2429: Type 'string' is not assignable to type 'number'. // N's a: new (x: number) => string; // error because base returns non-void; } diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt index 2d267d5a26..2b2e2eac3a 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance3.errors.txt @@ -41,11 +41,11 @@ interface I2 extends A { ~~ -!!! Interface 'I2' incorrectly extends interface 'A': -!!! Types of property 'a2' are incompatible: -!!! Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a2' are incompatible: +!!! error TS2429: Type 'new (x: T) => U[]' is not assignable to type 'new (x: number) => string[]': +!!! error TS2429: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. a2: new (x: T) => U[]; // error, no contextual signature instantiation since I2.a2 is not generic } @@ -56,15 +56,15 @@ interface I4 extends A { ~~ -!!! Interface 'I4' incorrectly extends interface 'A': -!!! Types of property 'a8' are incompatible: -!!! Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': -!!! Types of parameters 'arg2' and 'arg2' are incompatible: -!!! Type '{ foo: number; }' is not assignable to type 'Base': -!!! Types of property 'foo' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'A': +!!! error TS2429: Types of property 'a8' are incompatible: +!!! error TS2429: Type 'new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': +!!! error TS2429: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2429: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': +!!! error TS2429: Types of parameters 'arg2' and 'arg2' are incompatible: +!!! error TS2429: Type '{ foo: number; }' is not assignable to type 'Base': +!!! error TS2429: Types of property 'foo' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. a8: new (x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; // error, type mismatch } diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt index 970bafa492..3647221e64 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters.errors.txt @@ -16,23 +16,23 @@ interface I { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } interface I2 { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var a: { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var b: { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt index 5d208c8913..15aaf2d991 100644 --- a/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt +++ b/tests/baselines/reference/constructSignatureWithAccessibilityModifiersOnParameters2.errors.txt @@ -4,64 +4,64 @@ class C { constructor(public x, private y); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public x, private y) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. ~ -!!! Duplicate identifier 'y'. +!!! error TS2300: Duplicate identifier 'y'. } class C2 { constructor(private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public x) { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } class C3 { constructor(private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private y) { } } interface I { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } interface I2 { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var a: { new (public x); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (public y); ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } var b: { new (private x); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. new (private y); ~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt b/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt index 2d08a7ae1c..3b8e9770b0 100644 --- a/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt +++ b/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt @@ -32,7 +32,7 @@ interface I { ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. new (x: T, y?: number): C2; new (x: T, y: number): C2; } diff --git a/tests/baselines/reference/constructorArgsErrors1.errors.txt b/tests/baselines/reference/constructorArgsErrors1.errors.txt index 2b7754f860..adf3af43fb 100644 --- a/tests/baselines/reference/constructorArgsErrors1.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors1.errors.txt @@ -2,6 +2,6 @@ class foo { constructor (static a: number) { ~~~~~~ -!!! 'static' modifier cannot appear on a parameter. +!!! error TS1090: 'static' modifier cannot appear on a parameter. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors2.errors.txt b/tests/baselines/reference/constructorArgsErrors2.errors.txt index 75af200513..5627107f0e 100644 --- a/tests/baselines/reference/constructorArgsErrors2.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors2.errors.txt @@ -2,7 +2,7 @@ class foo { constructor (public static a: number) { ~~~~~~ -!!! 'static' modifier cannot appear on a parameter. +!!! error TS1090: 'static' modifier cannot appear on a parameter. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors3.errors.txt b/tests/baselines/reference/constructorArgsErrors3.errors.txt index b01950da27..f94723a16a 100644 --- a/tests/baselines/reference/constructorArgsErrors3.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors3.errors.txt @@ -2,7 +2,7 @@ class foo { constructor (public public a: number) { ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors4.errors.txt b/tests/baselines/reference/constructorArgsErrors4.errors.txt index 431844358e..b330b6f704 100644 --- a/tests/baselines/reference/constructorArgsErrors4.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors4.errors.txt @@ -2,7 +2,7 @@ class foo { constructor (private public a: number) { ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorArgsErrors5.errors.txt b/tests/baselines/reference/constructorArgsErrors5.errors.txt index 176a2b7db0..6e727d773c 100644 --- a/tests/baselines/reference/constructorArgsErrors5.errors.txt +++ b/tests/baselines/reference/constructorArgsErrors5.errors.txt @@ -2,7 +2,7 @@ class foo { constructor (export a: number) { ~~~~~~ -!!! 'export' modifier cannot appear on a parameter. +!!! error TS1090: 'export' modifier cannot appear on a parameter. } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorAsType.errors.txt b/tests/baselines/reference/constructorAsType.errors.txt index 1824ae98c8..7ef09183b4 100644 --- a/tests/baselines/reference/constructorAsType.errors.txt +++ b/tests/baselines/reference/constructorAsType.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/constructorAsType.ts (1 errors) ==== var Person:new () => {name: string;} = function () {return {name:"joe"};}; ~~~~~~ -!!! Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. +!!! error TS2323: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. var Person2:{new() : {name:string;};}; diff --git a/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt b/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt index 07bd240bfa..00eb7e0823 100644 --- a/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt +++ b/tests/baselines/reference/constructorDefaultValuesReferencingThis.errors.txt @@ -2,17 +2,17 @@ class C { constructor(x = this) { } ~~~~ -!!! 'this' cannot be referenced in constructor arguments. +!!! error TS2333: 'this' cannot be referenced in constructor arguments. } class D { constructor(x = this) { } ~~~~ -!!! 'this' cannot be referenced in constructor arguments. +!!! error TS2333: 'this' cannot be referenced in constructor arguments. } class E { constructor(public x = this) { } ~~~~ -!!! 'this' cannot be referenced in constructor arguments. +!!! error TS2333: 'this' cannot be referenced in constructor arguments. } \ No newline at end of file diff --git a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt index 9e25a43bec..92a1578cf5 100644 --- a/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt +++ b/tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt @@ -3,7 +3,7 @@ constructor(x); constructor(public x: string = 1) { // error ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var y = x; } } @@ -12,9 +12,9 @@ constructor(x: T, y: U); constructor(x: T = 1, public y: U = x) { // error ~~~~~~~~ -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2323: Type 'number' is not assignable to type 'T'. ~~~~~~~~~~~~~~~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. var z = x; } } @@ -23,7 +23,7 @@ constructor(x); constructor(x: T = new Date()) { // error ~~~~~~~~~~~~~~~~~ -!!! Type 'Date' is not assignable to type 'T'. +!!! error TS2323: Type 'Date' is not assignable to type 'T'. var y = x; } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt b/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt index c2021bb97f..78870f90ce 100644 --- a/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt +++ b/tests/baselines/reference/constructorInvocationWithTooFewTypeArgs.errors.txt @@ -9,5 +9,5 @@ var d = new D(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index c11e69d12b..ea58ac8914 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -11,7 +11,7 @@ } ~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. bar1() { /*WScript.Echo("bar1");*/ } bar2() { /*WScript.Echo("bar1");*/ } } @@ -20,10 +20,10 @@ var f2 = new Foo(0); var f3 = new Foo(f1); ~~ -!!! Argument of type 'Foo' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'Foo' is not assignable to parameter of type 'number'. var f4 = new Foo([f1,f2,f3]); ~~~~~~~~~~ -!!! Argument of type 'unknown[]' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type 'number'. f1.bar1(); f1.bar2(); diff --git a/tests/baselines/reference/constructorOverloads3.errors.txt b/tests/baselines/reference/constructorOverloads3.errors.txt index 0e106af99d..e240352156 100644 --- a/tests/baselines/reference/constructorOverloads3.errors.txt +++ b/tests/baselines/reference/constructorOverloads3.errors.txt @@ -12,7 +12,7 @@ constructor(a: any); constructor(x: any, y?: any) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. bar1() { /*WScript.Echo("Yo");*/} } diff --git a/tests/baselines/reference/constructorOverloads4.errors.txt b/tests/baselines/reference/constructorOverloads4.errors.txt index 5f46390fae..e95887fd3d 100644 --- a/tests/baselines/reference/constructorOverloads4.errors.txt +++ b/tests/baselines/reference/constructorOverloads4.errors.txt @@ -5,17 +5,17 @@ } export function Function(...args: any[]): any; ~~~~~~~~ -!!! Duplicate identifier 'Function'. +!!! error TS2300: Duplicate identifier 'Function'. export function Function(...args: string[]): Function; ~~~~~~~~ -!!! Duplicate identifier 'Function'. +!!! error TS2300: Duplicate identifier 'Function'. } (new M.Function("return 5"))(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. M.Function("yo"); ~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof Function' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Function' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads5.errors.txt b/tests/baselines/reference/constructorOverloads5.errors.txt index 706d9854e1..86245284dc 100644 --- a/tests/baselines/reference/constructorOverloads5.errors.txt +++ b/tests/baselines/reference/constructorOverloads5.errors.txt @@ -6,7 +6,7 @@ export function RegExp(pattern: string, flags: string): RegExp; export class RegExp { ~~~~~~ -!!! Duplicate identifier 'RegExp'. +!!! error TS2300: Duplicate identifier 'RegExp'. constructor(pattern: string); constructor(pattern: string, flags: string); exec(string: string): string[]; diff --git a/tests/baselines/reference/constructorOverloads6.errors.txt b/tests/baselines/reference/constructorOverloads6.errors.txt index 42256f68f8..ee24e4a94e 100644 --- a/tests/baselines/reference/constructorOverloads6.errors.txt +++ b/tests/baselines/reference/constructorOverloads6.errors.txt @@ -4,7 +4,7 @@ constructor(n: number); constructor(x: any) { ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. } bar1():void; diff --git a/tests/baselines/reference/constructorOverloads7.errors.txt b/tests/baselines/reference/constructorOverloads7.errors.txt index dab93a3cc2..68016fa29f 100644 --- a/tests/baselines/reference/constructorOverloads7.errors.txt +++ b/tests/baselines/reference/constructorOverloads7.errors.txt @@ -15,7 +15,7 @@ // to be Point and return type is inferred to be void function Point(x, y) { ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. this.x = x; this.y = y; @@ -24,7 +24,7 @@ declare function EF1(a:number, b:number):number; ~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function EF1(a,b) { return a+b; } \ No newline at end of file diff --git a/tests/baselines/reference/constructorOverloads8.errors.txt b/tests/baselines/reference/constructorOverloads8.errors.txt index 15f43a432f..5e3cc30106 100644 --- a/tests/baselines/reference/constructorOverloads8.errors.txt +++ b/tests/baselines/reference/constructorOverloads8.errors.txt @@ -3,7 +3,7 @@ constructor(x) { } constructor(y, x) { } // illegal, 2 constructor implementations ~~~~~~~~~~~~~~~~~~~~~ -!!! Multiple constructor implementations are not allowed. +!!! error TS2392: Multiple constructor implementations are not allowed. } class D { diff --git a/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt b/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt index f594e17626..f846149a5e 100644 --- a/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt +++ b/tests/baselines/reference/constructorOverloadsWithDefaultValues.errors.txt @@ -3,7 +3,7 @@ foo: string; constructor(x = 1); // error ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. constructor() { } } @@ -12,7 +12,7 @@ foo: string; constructor(x = 1); // error ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. constructor() { } } \ No newline at end of file diff --git a/tests/baselines/reference/constructorParameterProperties.errors.txt b/tests/baselines/reference/constructorParameterProperties.errors.txt index b92f2fd9a8..010853d8aa 100644 --- a/tests/baselines/reference/constructorParameterProperties.errors.txt +++ b/tests/baselines/reference/constructorParameterProperties.errors.txt @@ -8,7 +8,7 @@ var r = c.y; var r2 = c.x; // error ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. class D { y: T; @@ -19,7 +19,7 @@ var r = d.y; var r2 = d.x; // error ~~~ -!!! Property 'D.x' is inaccessible. +!!! error TS2341: Property 'D.x' is inaccessible. var r3 = d.a; // error ~ -!!! Property 'a' does not exist on type 'D'. \ No newline at end of file +!!! error TS2339: Property 'a' does not exist on type 'D'. \ No newline at end of file diff --git a/tests/baselines/reference/constructorParameterProperties2.errors.txt b/tests/baselines/reference/constructorParameterProperties2.errors.txt index b8b04833db..05c2d55433 100644 --- a/tests/baselines/reference/constructorParameterProperties2.errors.txt +++ b/tests/baselines/reference/constructorParameterProperties2.errors.txt @@ -11,7 +11,7 @@ y: number; constructor(public y: number) { } // error ~ -!!! Duplicate identifier 'y'. +!!! error TS2300: Duplicate identifier 'y'. } var d: D; @@ -21,7 +21,7 @@ y: number; constructor(private y: number) { } // error ~ -!!! Duplicate identifier 'y'. +!!! error TS2300: Duplicate identifier 'y'. } var e: E; diff --git a/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt b/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt index f784cd0b8b..9a6a753eb0 100644 --- a/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt +++ b/tests/baselines/reference/constructorParameterShadowsOuterScopes.errors.txt @@ -8,11 +8,11 @@ class C { b = x; // error, evaluated in scope of constructor, cannot reference x ~ -!!! Initializer of instance member variable 'b' cannot reference identifier 'x' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'x' declared in the constructor. constructor(x: string) { x = 2; // error, x is string ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } } @@ -20,7 +20,7 @@ class D { b = y; // error, evaluated in scope of constructor, cannot reference y ~ -!!! Initializer of instance member variable 'b' cannot reference identifier 'y' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'b' cannot reference identifier 'y' declared in the constructor. constructor(x: string) { var y = ""; } diff --git a/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt b/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt index 4afccf82d9..4dccf9ff2b 100644 --- a/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt +++ b/tests/baselines/reference/constructorParametersInVariableDeclarations.errors.txt @@ -2,13 +2,13 @@ class A { private a = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private b = { p: x }; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private c = () => x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(x: number) { } } @@ -16,13 +16,13 @@ class B { private a = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private b = { p: x }; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. private c = () => x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor() { var x = 1; } diff --git a/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt b/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt index 92619b6815..817361e1a9 100644 --- a/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt +++ b/tests/baselines/reference/constructorParametersThatShadowExternalNamesInVariableDeclarations.errors.txt @@ -3,7 +3,7 @@ class A { private a = x; ~ -!!! Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. constructor(x: number) { } } @@ -11,7 +11,7 @@ class B { private a = x; ~ -!!! Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. +!!! error TS2301: Initializer of instance member variable 'a' cannot reference identifier 'x' declared in the constructor. constructor() { var x = ""; } diff --git a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt index fb2ac126a9..20772bb5f8 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt +++ b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt @@ -3,7 +3,7 @@ constructor() { return 1; ~ -!!! Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } foo() { } } diff --git a/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt b/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt index 494c28e89e..5d98356f64 100644 --- a/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt +++ b/tests/baselines/reference/constructorStaticParamNameErrors.errors.txt @@ -4,5 +4,5 @@ class test { constructor (static) { } ~~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. } \ No newline at end of file diff --git a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt index 9fc3143551..fbefc095cc 100644 --- a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt +++ b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt @@ -12,7 +12,7 @@ constructor() { return 1; // error ~ -!!! Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } } @@ -28,7 +28,7 @@ constructor() { return { x: 1 }; // error ~~~~~~~~ -!!! Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class } } diff --git a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt index d7ba7dcf92..cfc8b6180a 100644 --- a/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt +++ b/tests/baselines/reference/constructorsWithSpecializedSignatures.errors.txt @@ -3,10 +3,10 @@ declare class C { constructor(x: "hi"); ~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: "foo"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: number); } @@ -21,14 +21,14 @@ class D { constructor(x: "hi"); ~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: "foo"); ~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. constructor(x: number); constructor(x: "hi") { } ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. } // overloads are ok @@ -38,17 +38,17 @@ constructor(x: string); constructor(x: "hi") { } // error ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. } // errors interface I { new (x: "hi"); ~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. new (x: "foo"); ~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. new (x: number); } diff --git a/tests/baselines/reference/contextualTyping.errors.txt b/tests/baselines/reference/contextualTyping.errors.txt index 69bffcc578..f467dc8c28 100644 --- a/tests/baselines/reference/contextualTyping.errors.txt +++ b/tests/baselines/reference/contextualTyping.errors.txt @@ -189,7 +189,7 @@ // contextually typing function declarations declare function EF1(a:number, b:number):number; ~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function EF1(a,b) { return a+b; } @@ -209,7 +209,7 @@ function Point(x, y) { ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. this.x = x; this.y = y; @@ -234,5 +234,5 @@ interface B extends A { } var x: B = { }; ~ -!!! Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'B':\n Property 'x' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping11.errors.txt b/tests/baselines/reference/contextualTyping11.errors.txt index b6e8970c76..b614d6e7fe 100644 --- a/tests/baselines/reference/contextualTyping11.errors.txt +++ b/tests/baselines/reference/contextualTyping11.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/contextualTyping11.ts (1 errors) ==== class foo { public bar:{id:number;}[] = [({})]; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'foo[]' is not assignable to type '{ id: number; }[]': -!!! Type 'foo' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type 'foo'. \ No newline at end of file +!!! error TS2322: Type 'foo[]' is not assignable to type '{ id: number; }[]': +!!! error TS2322: Type 'foo' is not assignable to type '{ id: number; }': +!!! error TS2322: Property 'id' is missing in type 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping21.errors.txt b/tests/baselines/reference/contextualTyping21.errors.txt index 12f7d53db8..41e3edb5b1 100644 --- a/tests/baselines/reference/contextualTyping21.errors.txt +++ b/tests/baselines/reference/contextualTyping21.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/contextualTyping21.ts (1 errors) ==== var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1]; ~~~ -!!! Type '{}[]' is not assignable to type '{ id: number; }[]': -!!! Type '{}' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type '{}'. \ No newline at end of file +!!! error TS2322: Type '{}[]' is not assignable to type '{ id: number; }[]': +!!! error TS2322: Type '{}' is not assignable to type '{ id: number; }': +!!! error TS2322: Property 'id' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping24.errors.txt b/tests/baselines/reference/contextualTyping24.errors.txt index 5c5a54d280..cf086e9107 100644 --- a/tests/baselines/reference/contextualTyping24.errors.txt +++ b/tests/baselines/reference/contextualTyping24.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/contextualTyping24.ts (1 errors) ==== var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){return 5}; ~~~ -!!! Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number': -!!! Types of parameters 'a' and 'a' are incompatible: -!!! Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file +!!! error TS2322: Type '(a: string) => number' is not assignable to type '(a: { (): number; (i: number): number; }) => number': +!!! error TS2322: Types of parameters 'a' and 'a' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping30.errors.txt b/tests/baselines/reference/contextualTyping30.errors.txt index 259f59faac..871b22f733 100644 --- a/tests/baselines/reference/contextualTyping30.errors.txt +++ b/tests/baselines/reference/contextualTyping30.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/contextualTyping30.ts (1 errors) ==== function foo(param:number[]){}; foo([1, "a"]); ~~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. -!!! Type '{}' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'number[]'. +!!! error TS2345: Type '{}' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping33.errors.txt b/tests/baselines/reference/contextualTyping33.errors.txt index adf233b493..2499b85de1 100644 --- a/tests/baselines/reference/contextualTyping33.errors.txt +++ b/tests/baselines/reference/contextualTyping33.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/contextualTyping33.ts (1 errors) ==== function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. -!!! Type '{}' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. +!!! error TS2345: Type '{}' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping39.errors.txt b/tests/baselines/reference/contextualTyping39.errors.txt index 10be241532..16de9be621 100644 --- a/tests/baselines/reference/contextualTyping39.errors.txt +++ b/tests/baselines/reference/contextualTyping39.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/contextualTyping39.ts (1 errors) ==== var foo = <{ (): number; }> function() { return "err"; }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '() => string' nor type '() => number' is assignable to the other: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2353: Neither type '() => string' nor type '() => number' is assignable to the other: +!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping41.errors.txt b/tests/baselines/reference/contextualTyping41.errors.txt index 6e95b0092c..2f83cae94c 100644 --- a/tests/baselines/reference/contextualTyping41.errors.txt +++ b/tests/baselines/reference/contextualTyping41.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/contextualTyping41.ts (1 errors) ==== var foo = <{():number; (i:number):number; }> (function(){return "err";}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2353: Neither type '() => string' nor type '{ (): number; (i: number): number; }' is assignable to the other: +!!! error TS2353: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping5.errors.txt b/tests/baselines/reference/contextualTyping5.errors.txt index b72968af35..5ebed1ade6 100644 --- a/tests/baselines/reference/contextualTyping5.errors.txt +++ b/tests/baselines/reference/contextualTyping5.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/contextualTyping5.ts (1 errors) ==== class foo { public bar:{id:number;} = { }; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type '{}' is not assignable to type '{ id: number; }': -!!! Property 'id' is missing in type '{}'. \ No newline at end of file +!!! error TS2322: Type '{}' is not assignable to type '{ id: number; }': +!!! error TS2322: Property 'id' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfAccessors.errors.txt b/tests/baselines/reference/contextualTypingOfAccessors.errors.txt index 93ae5f8586..6a307e58f6 100644 --- a/tests/baselines/reference/contextualTypingOfAccessors.errors.txt +++ b/tests/baselines/reference/contextualTypingOfAccessors.errors.txt @@ -8,11 +8,11 @@ x = { get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return (n)=>n }, set foo(x) {} ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt index eff83efa96..f7c166f5d3 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.errors.txt @@ -5,10 +5,10 @@ var x3: I = [new Date(), 1]; ~~ -!!! Type '{}[]' is not assignable to type 'I': -!!! Index signatures are incompatible: -!!! Type '{}' is not assignable to type 'Date': -!!! Property 'toDateString' is missing in type '{}'. +!!! error TS2322: Type '{}[]' is not assignable to type 'I': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type '{}' is not assignable to type 'Date': +!!! error TS2322: Property 'toDateString' is missing in type '{}'. var r2 = x3[1]; r2.getDate(); \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt index 29ca48f0c2..77fbde2210 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.errors.txt @@ -11,7 +11,7 @@ var x2: (a: A) => void = true ? (a: C) => a.foo : (b: number) => { }; ~~ -!!! Type '{}' is not assignable to type '(a: A) => void'. +!!! error TS2323: Type '{}' is not assignable to type '(a: A) => void'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! No best common type exists between '(a: A) => void', '(a: C) => number', and '(b: number) => void'. +!!! error TS2366: No best common type exists between '(a: A) => void', '(a: C) => number', and '(b: number) => void'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt index 2a768d452b..dd77e7026c 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt @@ -16,8 +16,8 @@ var f = (x: number) => { return x.toFixed() }; var r5 = _.forEach(c2, f); ~ -!!! Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. +!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. var r6 = _.forEach(c2, (x) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. +!!! error TS2345: Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt index 4f04803d0a..0cf3f14edd 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt +++ b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.errors.txt @@ -5,7 +5,7 @@ callb((a) => a.length); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body ~~~~~~ -!!! Property 'length' does not exist on type 'number'. \ No newline at end of file +!!! error TS2339: Property 'length' does not exist on type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt index 2e3633b4d6..76b6c6554e 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt @@ -4,8 +4,8 @@ obj1 = {}; // Ok obj1 = obj2; // Error - indexer doesn't match ~~~~ -!!! Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }': -!!! Index signature is missing in type '{ x: string; }'. +!!! error TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signature is missing in type '{ x: string; }'. function f(x: { [s: string]: string }) { } @@ -13,4 +13,4 @@ f(obj1); // Ok f(obj2); // Error - indexer doesn't match ~~~~ -!!! Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt b/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt index a91abdb295..0e4ec94d84 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals2.errors.txt @@ -5,4 +5,4 @@ function f2(args: Foo) { } f2({ foo: s => s.hmm }) // 's' should be 'string', so this should be an error ~~~ -!!! Property 'hmm' does not exist on type 'string'. \ No newline at end of file +!!! error TS2339: Property 'hmm' does not exist on type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt index e9de74b27e..229a9cf4a3 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt @@ -2,5 +2,5 @@ var f10: (x: T, b: () => (a: T) => void, y: T) => T; f10('', () => a => a.foo, ''); // a is string, fixed by first parameter ~~~ -!!! Property 'foo' does not exist on type 'string'. +!!! error TS2339: Property 'foo' does not exist on type 'string'. var r9 = f10('', () => (a => a.foo), 1); // now a should be any \ No newline at end of file diff --git a/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt b/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt index 8c22771ad8..667fae3444 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt +++ b/tests/baselines/reference/contextuallyTypingOrOperator3.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/contextuallyTypingOrOperator3.ts (1 errors) ==== function foo(u: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var x3: U = u || u; } \ No newline at end of file diff --git a/tests/baselines/reference/continueInIterationStatement4.errors.txt b/tests/baselines/reference/continueInIterationStatement4.errors.txt index c0f4388cf7..608bd1a1e2 100644 --- a/tests/baselines/reference/continueInIterationStatement4.errors.txt +++ b/tests/baselines/reference/continueInIterationStatement4.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/continueInIterationStatement4.ts (1 errors) ==== for (var i in something) { ~~~~~~~~~ -!!! Cannot find name 'something'. +!!! error TS2304: Cannot find name 'something'. continue; } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement1.errors.txt b/tests/baselines/reference/continueNotInIterationStatement1.errors.txt index 5f7d543a0a..a4ac8a5533 100644 --- a/tests/baselines/reference/continueNotInIterationStatement1.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement1.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/continueNotInIterationStatement1.ts (1 errors) ==== continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. \ No newline at end of file +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement2.errors.txt b/tests/baselines/reference/continueNotInIterationStatement2.errors.txt index 0bfc41d7f7..67346474de 100644 --- a/tests/baselines/reference/continueNotInIterationStatement2.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement2.errors.txt @@ -3,6 +3,6 @@ function f() { continue; ~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement3.errors.txt b/tests/baselines/reference/continueNotInIterationStatement3.errors.txt index d8627b4fc3..7c81f195c2 100644 --- a/tests/baselines/reference/continueNotInIterationStatement3.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement3.errors.txt @@ -3,5 +3,5 @@ default: continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/continueNotInIterationStatement4.errors.txt b/tests/baselines/reference/continueNotInIterationStatement4.errors.txt index 91e7b26b57..d094faafd6 100644 --- a/tests/baselines/reference/continueNotInIterationStatement4.errors.txt +++ b/tests/baselines/reference/continueNotInIterationStatement4.errors.txt @@ -4,7 +4,7 @@ var x = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget1.errors.txt b/tests/baselines/reference/continueTarget1.errors.txt index 1b93d9fc70..f787f65e94 100644 --- a/tests/baselines/reference/continueTarget1.errors.txt +++ b/tests/baselines/reference/continueTarget1.errors.txt @@ -2,4 +2,4 @@ target: continue target; ~~~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. \ No newline at end of file +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget5.errors.txt b/tests/baselines/reference/continueTarget5.errors.txt index aa156707aa..3934b46cf6 100644 --- a/tests/baselines/reference/continueTarget5.errors.txt +++ b/tests/baselines/reference/continueTarget5.errors.txt @@ -5,7 +5,7 @@ while (true) { continue target; ~~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } } \ No newline at end of file diff --git a/tests/baselines/reference/continueTarget6.errors.txt b/tests/baselines/reference/continueTarget6.errors.txt index 2177e50523..59261b2709 100644 --- a/tests/baselines/reference/continueTarget6.errors.txt +++ b/tests/baselines/reference/continueTarget6.errors.txt @@ -2,5 +2,5 @@ while (true) { continue target; ~~~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/copyrightWithNewLine1.errors.txt b/tests/baselines/reference/copyrightWithNewLine1.errors.txt index a389197bf3..c8cb1ec68b 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithNewLine1.errors.txt @@ -5,10 +5,10 @@ import model = require("./greeter") ~~~~~~~~~~~ -!!! Cannot find external module './greeter'. +!!! error TS2307: Cannot find external module './greeter'. var el = document.getElementById('content'); ~~~~~~~~ -!!! Cannot find name 'document'. +!!! error TS2304: Cannot find name 'document'. var greeter = new model.Greeter(el); /** things */ greeter.start(); \ No newline at end of file diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt index 429764799e..0c8f3e6132 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt @@ -4,10 +4,10 @@ ****************************/ import model = require("./greeter") ~~~~~~~~~~~ -!!! Cannot find external module './greeter'. +!!! error TS2307: Cannot find external module './greeter'. var el = document.getElementById('content'); ~~~~~~~~ -!!! Cannot find name 'document'. +!!! error TS2304: Cannot find name 'document'. var greeter = new model.Greeter(el); /** things */ greeter.start(); \ No newline at end of file diff --git a/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt b/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt index 8a813a1b43..26d690268f 100644 --- a/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt +++ b/tests/baselines/reference/couldNotSelectGenericOverload.errors.txt @@ -3,11 +3,11 @@ var b = [1, ""]; var b1G = makeArray(1, ""); // any, no error ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var b2G = makeArray(b); // any[] function makeArray2(items: any[]): any[] { return items; } var b3G = makeArray2(1, ""); // error ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt index 3659bab73e..f0d93600da 100644 --- a/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt +++ b/tests/baselines/reference/crashInsourcePropertyIsRelatableToTargetProperty.errors.txt @@ -5,12 +5,12 @@ class D extends C { } function foo(x: "hi", items: string[]): typeof foo; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: string, items: string[]): typeof foo { return null; } var a: D = foo("hi", []); ~ -!!! Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D': -!!! Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. +!!! error TS2322: Type '(x: "hi", items: string[]) => typeof foo' is not assignable to type 'D': +!!! error TS2322: Property 'x' is missing in type '(x: "hi", items: string[]) => typeof foo'. \ No newline at end of file diff --git a/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt b/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt index 46693ee572..4b393eaf18 100644 --- a/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt +++ b/tests/baselines/reference/crashIntypeCheckInvocationExpression.errors.txt @@ -6,16 +6,16 @@ } export var compileServer = task(() => { ~~~~ -!!! Cannot find name 'task'. +!!! error TS2304: Cannot find name 'task'. var folder = path.join(), ~~~~ -!!! Cannot find name 'path'. +!!! error TS2304: Cannot find name 'path'. fileset = nake.fileSetSync(folder) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. return doCompile(fileset, moduleType); ~~~~~~~~~~ -!!! Cannot find name 'moduleType'. +!!! error TS2304: Cannot find name 'moduleType'. }); \ No newline at end of file diff --git a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt index 3399c75914..5e254fac22 100644 --- a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt +++ b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.errors.txt @@ -3,7 +3,7 @@ public injectRequestService(service: P0) { this.injectBuildService(new X(service)); ~ -!!! Cannot find name 'X'. +!!! error TS2304: Cannot find name 'X'. } public injectBuildService(service: P0) { } diff --git a/tests/baselines/reference/crashOnMethodSignatures.errors.txt b/tests/baselines/reference/crashOnMethodSignatures.errors.txt index 014700b813..5023109fcc 100644 --- a/tests/baselines/reference/crashOnMethodSignatures.errors.txt +++ b/tests/baselines/reference/crashOnMethodSignatures.errors.txt @@ -2,6 +2,6 @@ class A { a(completed: () => any): void; ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/crashRegressionTest.errors.txt b/tests/baselines/reference/crashRegressionTest.errors.txt index a08d118139..bf32994b83 100644 --- a/tests/baselines/reference/crashRegressionTest.errors.txt +++ b/tests/baselines/reference/crashRegressionTest.errors.txt @@ -16,7 +16,7 @@ public text(value?: string): any { this._templateStorage.templateSources[this._name] = value; ~~~~~ -!!! Property '_name' does not exist on type 'StringTemplate'. +!!! error TS2339: Property '_name' does not exist on type 'StringTemplate'. } } diff --git a/tests/baselines/reference/createArray.errors.txt b/tests/baselines/reference/createArray.errors.txt index 41426d307f..d94c7bd11c 100644 --- a/tests/baselines/reference/createArray.errors.txt +++ b/tests/baselines/reference/createArray.errors.txt @@ -1,26 +1,26 @@ ==== tests/cases/compiler/createArray.ts (7 errors) ==== var na=new number[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. class C { } new C[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var ba=new boolean[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~~ -!!! Cannot find name 'boolean'. +!!! error TS2304: Cannot find name 'boolean'. var sa=new string[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. function f(s:string):number { return 0; } if (ba[14]) { diff --git a/tests/baselines/reference/customEventDetail.errors.txt b/tests/baselines/reference/customEventDetail.errors.txt index 7cddf40e6f..6a170f12ea 100644 --- a/tests/baselines/reference/customEventDetail.errors.txt +++ b/tests/baselines/reference/customEventDetail.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/customEventDetail.ts (1 errors) ==== var x: CustomEvent; ~~~~~~~~~~~ -!!! Cannot find name 'CustomEvent'. +!!! error TS2304: Cannot find name 'CustomEvent'. // valid since detail is any x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' }); diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt index bb0e82e470..7d49b7904a 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.errors.txt @@ -5,10 +5,10 @@ b: 10, get x() { return x; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set x(a: number) { this.b = a; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; }; var /*4*/point = makePoint(2); diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt index 17d42cfbbb..c34f8b9991 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.errors.txt @@ -4,7 +4,7 @@ return { get x() { return x; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; }; var /*4*/point = makePoint(2); diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt index 5499492fea..caed636d76 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.errors.txt @@ -5,7 +5,7 @@ b: 10, set x(a: number) { this.b = a; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; }; var /*3*/point = makePoint(2); diff --git a/tests/baselines/reference/declFilePrivateStatic.errors.txt b/tests/baselines/reference/declFilePrivateStatic.errors.txt index 14d69a0653..5b8e54dcbb 100644 --- a/tests/baselines/reference/declFilePrivateStatic.errors.txt +++ b/tests/baselines/reference/declFilePrivateStatic.errors.txt @@ -9,15 +9,15 @@ private static get c() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get d() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set e(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set f(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/declInput-2.errors.txt b/tests/baselines/reference/declInput-2.errors.txt index a987b7ac17..3e66a7f837 100644 --- a/tests/baselines/reference/declInput-2.errors.txt +++ b/tests/baselines/reference/declInput-2.errors.txt @@ -10,23 +10,23 @@ public m2: string; public m22: C; // don't generate ~~~~~~~~~~~~~~ -!!! Public property 'm22' of exported class has or is using private name 'C'. +!!! error TS4031: Public property 'm22' of exported class has or is using private name 'C'. public m23: E; public m24: I1; public m25: I2; // don't generate ~~~~~~~~~~~~~~~ -!!! Public property 'm25' of exported class has or is using private name 'I2'. +!!! error TS4031: Public property 'm25' of exported class has or is using private name 'I2'. public m232(): E { return null;} public m242(): I1 { return null; } public m252(): I2 { return null; } // don't generate ~~~~ -!!! Return type of public method from exported class has or is using private name 'I2'. +!!! error TS4055: Return type of public method from exported class has or is using private name 'I2'. public m26(i:I1) {} public m262(i:I2) {} ~~~~ -!!! Parameter 'i' of public method from exported class has or is using private name 'I2'. +!!! error TS4073: Parameter 'i' of public method from exported class has or is using private name 'I2'. public m3():C { return new C(); } ~~ -!!! Return type of public method from exported class has or is using private name 'C'. +!!! error TS4055: Return type of public method from exported class has or is using private name 'C'. } } \ No newline at end of file diff --git a/tests/baselines/reference/declInput.errors.txt b/tests/baselines/reference/declInput.errors.txt index c2d4c37e9e..a0133c8f20 100644 --- a/tests/baselines/reference/declInput.errors.txt +++ b/tests/baselines/reference/declInput.errors.txt @@ -5,7 +5,7 @@ class bar { ~~~ -!!! Duplicate identifier 'bar'. +!!! error TS2300: Duplicate identifier 'bar'. public f() { return ''; } public g() { return {a: null, b: undefined, c: void 4 }; } public h(x = 4, y = null, z = '') { x++; } diff --git a/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt b/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt index 91368320ba..74646c4ce2 100644 --- a/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt +++ b/tests/baselines/reference/declarationEmit_invalidReference2.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/declarationEmit_invalidReference2.ts (1 errors) ==== /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! File 'invalid.ts' not found. +!!! error TS6053: File 'invalid.ts' not found. var x = 0; \ No newline at end of file diff --git a/tests/baselines/reference/declareAlreadySeen.errors.txt b/tests/baselines/reference/declareAlreadySeen.errors.txt index 0c765edf9d..58d1520b12 100644 --- a/tests/baselines/reference/declareAlreadySeen.errors.txt +++ b/tests/baselines/reference/declareAlreadySeen.errors.txt @@ -2,16 +2,16 @@ module M { declare declare var x; ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. declare declare function f(); ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. declare declare module N { } ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. declare declare class C { } ~~~~~~~ -!!! 'declare' modifier already seen. +!!! error TS1030: 'declare' modifier already seen. } \ No newline at end of file diff --git a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt index 8fc743d97f..23ff62777b 100644 --- a/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt +++ b/tests/baselines/reference/declareClassInterfaceImplementation.errors.txt @@ -5,8 +5,8 @@ declare class Buffer implements IBuffer { ~~~~~~ -!!! Class 'Buffer' incorrectly implements interface 'IBuffer': -!!! Index signature is missing in type 'Buffer'. +!!! error TS2421: Class 'Buffer' incorrectly implements interface 'IBuffer': +!!! error TS2421: Index signature is missing in type 'Buffer'. } \ No newline at end of file diff --git a/tests/baselines/reference/decrementAndIncrementOperators.errors.txt b/tests/baselines/reference/decrementAndIncrementOperators.errors.txt index 27c6c19ed1..7669ecda2a 100644 --- a/tests/baselines/reference/decrementAndIncrementOperators.errors.txt +++ b/tests/baselines/reference/decrementAndIncrementOperators.errors.txt @@ -4,49 +4,49 @@ // errors 1 ++; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1)++; ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1)--; ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++(1); ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --(1); ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1 + 2)++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (1 + 2)--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++(1 + 2); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --(1 + 2); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (x + x)++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. (x + x)--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++(x + x); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --(x + x); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. //OK x++; diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index 5bc5153a61..fb6515eba0 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -24,138 +24,138 @@ // any type var var ResultIsNumber1 = --ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = --A; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = --M; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = --obj; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = --obj1; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = ANY2--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = A--; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = M--; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = obj--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = obj1--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type literal var ResultIsNumber11 = --{}; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = --null; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = --undefined; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = null--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = {}--; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = undefined--; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type expressions var ResultIsNumber17 = --foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber18 = --A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber19 = --(null + undefined); ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber20 = --(null + null); ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber21 = --(undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber22 = --obj1.x; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber23 = --obj1.y; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber24 = foo()--; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber25 = A.foo()--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber26 = (null + undefined)--; ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber27 = (null + null)--; ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber28 = (undefined + undefined)--; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber29 = obj1.x--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber30 = obj1.y--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators --ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ANY2--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --ANY1--; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --ANY1++; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY1--; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --ANY2[0]--; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --ANY2[0]++; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY2[0]--; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt index de547e5b70..2045fb26ae 100644 --- a/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithEnumTypeInvalidOperations.errors.txt @@ -7,37 +7,37 @@ // enum type var var ResultIsNumber1 = --ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = --ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = ENUM--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ENUM1--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // enum type expressions var ResultIsNumber5 = --(ENUM[1] + ENUM[2]); ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = (ENUM[1] + ENUM[2])--; ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operator --ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM1--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt index ced764db19..6355a2fcb7 100644 --- a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.errors.txt @@ -18,70 +18,70 @@ //number type var var ResultIsNumber1 = --NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = NUMBER1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type literal var ResultIsNumber3 = --1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber4 = --{ x: 1, y: 2}; ~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = --{ x: 1, y: (n: number) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = 1--; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber7 = { x: 1, y: 2 }--; ~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: 1, y: (n: number) => { return n; } }--; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type expressions var ResultIsNumber9 = --foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber10 = --A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber11 = --(NUMBER + NUMBER); ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber12 = foo()--; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber13 = A.foo()--; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber14 = (NUMBER + NUMBER)--; ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // miss assignment operator --1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. 1--; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. NUMBER1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()--; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt index 3f986e98e1..03554e1026 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.errors.txt @@ -17,97 +17,97 @@ // boolean type var var ResultIsNumber1 = --BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = BOOLEAN--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type literal var ResultIsNumber3 = --true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = --{ x: true, y: false }; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = --{ x: true, y: (n: boolean) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = true--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = { x: true, y: false }--; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: true, y: (n: boolean) => { return n; } }--; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type expressions var ResultIsNumber9 = --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber11 = --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = --A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = A.foo()--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators --true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. true--; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. BOOLEAN--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--, M.n--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt index 9ec8deb208..c232f69aab 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.errors.txt @@ -18,127 +18,127 @@ // string type var var ResultIsNumber1 = --STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = --STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = STRING--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = STRING1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type literal var ResultIsNumber5 = --""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = --{ x: "", y: "" }; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = --{ x: "", y: (s: string) => { return s; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = ""--; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = { x: "", y: "" }--; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = { x: "", y: (s: string) => { return s; } }--; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type expressions var ResultIsNumber11 = --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = --STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = --A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = --(STRING + STRING); ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber17 = objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber18 = M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber19 = STRING1[0]--; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber20 = foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber21 = A.foo()--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber22 = (STRING + STRING)--; ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators --""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ""--; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1--; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1[0]--; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()--; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n--; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a--, M.n--; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt b/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt index 2b8250f6fb..7223f96a54 100644 --- a/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt +++ b/tests/baselines/reference/defaultArgsForwardReferencing.errors.txt @@ -6,16 +6,16 @@ function right(a = b, b = a) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. a; b; } function right2(a = b, b = c, c = a) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. ~ -!!! Initializer of parameter 'b' cannot reference identifier 'c' declared after it. +!!! error TS2373: Initializer of parameter 'b' cannot reference identifier 'c' declared after it. a; b; c; @@ -23,7 +23,7 @@ function inside(a = b) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. var b; } @@ -31,7 +31,7 @@ var b; function inside(a = b) { // Still an error because b is declared inside the function ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. var b; } } @@ -42,17 +42,17 @@ class C { constructor(a = b, b = 1) { } ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. method(a = b, b = 1) { } ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. } // Function expressions var x = (a = b, b = c, c = d) => { var d; }; ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. ~ -!!! Initializer of parameter 'b' cannot reference identifier 'c' declared after it. +!!! error TS2373: Initializer of parameter 'b' cannot reference identifier 'c' declared after it. ~ -!!! Initializer of parameter 'c' cannot reference identifier 'd' declared after it. \ No newline at end of file +!!! error TS2373: Initializer of parameter 'c' cannot reference identifier 'd' declared after it. \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt index 7fb00da2b4..70be32738a 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt @@ -4,35 +4,35 @@ n = f(); var s: string = f(''); ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. s = f(); ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. // Type check the default argument with the type annotation var f2 = function (a: string = 3) { return a; }; // Should error, but be of type (a: string) => string; ~~~~~~~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. s = f2(''); s = f2(); n = f2(); ~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. // Contextually type the default arg with the type annotation var f3 = function (a: (s: string) => any = (s) => s) { }; ~~~~~~~~~ -!!! Neither type 'string' nor type 'number' is assignable to the other. +!!! error TS2352: Neither type 'string' nor type 'number' is assignable to the other. // Type check using the function's contextual type var f4: (a: number) => void = function (a = "") { }; ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. // Contextually type the default arg using the function's contextual type var f5: (a: (s: string) => any) => void = function (a = s => s) { }; ~~~~~~~~~ -!!! Neither type 'string' nor type 'number' is assignable to the other. +!!! error TS2352: Neither type 'string' nor type 'number' is assignable to the other. // Instantiated module module T { } @@ -42,7 +42,7 @@ var f6 = (t = T) => { }; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. var f7 = (t = U) => { return t; }; f7().x; \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsInOverloads.errors.txt b/tests/baselines/reference/defaultArgsInOverloads.errors.txt index 93f8856052..39c227a741 100644 --- a/tests/baselines/reference/defaultArgsInOverloads.errors.txt +++ b/tests/baselines/reference/defaultArgsInOverloads.errors.txt @@ -2,19 +2,19 @@ function fun(a: string); function fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function fun(a = null) { } class C { fun(a: string); fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. fun(a = null) { } static fun(a: string); static fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. static fun(a = null) { } } @@ -22,9 +22,9 @@ fun(a: string); fun(a = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } var f: (a = 3) => number; ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. \ No newline at end of file +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. \ No newline at end of file diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt index df98b96534..67d5e10d8e 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt @@ -4,7 +4,7 @@ obj1.length; ~~~~~~ -!!! Property 'length' does not exist on type '{}'. +!!! error TS2339: Property 'length' does not exist on type '{}'. @@ -12,7 +12,7 @@ obj2.length; ~~~~~~ -!!! Property 'length' does not exist on type 'Object'. +!!! error TS2339: Property 'length' does not exist on type 'Object'. @@ -22,5 +22,5 @@ var elementCount = result.length; // would like to get an error by now ~~~~~~ -!!! Property 'length' does not exist on type '{}'. +!!! error TS2339: Property 'length' does not exist on type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt b/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt index c762d0919d..29f71e75f9 100644 --- a/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt +++ b/tests/baselines/reference/defaultValueInConstructorOverload1.errors.txt @@ -2,7 +2,7 @@ class C { constructor(x = ''); ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. constructor(x = '') { } } \ No newline at end of file diff --git a/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt b/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt index 283e287e9d..345bb9c84a 100644 --- a/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt +++ b/tests/baselines/reference/defaultValueInFunctionOverload1.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/defaultValueInFunctionOverload1.ts (1 errors) ==== function foo(x: string = ''); ~~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function foo(x = '') { } \ No newline at end of file diff --git a/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt b/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt index 22a0c718c7..20fbdcc428 100644 --- a/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt +++ b/tests/baselines/reference/defaultValueInFunctionTypes.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/defaultValueInFunctionTypes.ts (1 errors) ==== var x: (a: number = 1) => number; ~~~~~~~~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. var y = <(a : string = "") => any>(undefined) \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperator1.errors.txt b/tests/baselines/reference/deleteOperator1.errors.txt index 7a80456b21..801215341d 100644 --- a/tests/baselines/reference/deleteOperator1.errors.txt +++ b/tests/baselines/reference/deleteOperator1.errors.txt @@ -4,4 +4,4 @@ var y: any = delete a; var z: number = delete a; ~ -!!! Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt b/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt index 89980ef9bc..c0f62050be 100644 --- a/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt @@ -5,14 +5,14 @@ // operand before delete operator var BOOLEAN1 = ANY delete ; //expect error ~~~~~~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // miss an operand var BOOLEAN2 = delete ; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // delete global variable s class testADelx { diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt index 18382a6f45..3a14a41d72 100644 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt @@ -45,13 +45,13 @@ var ResultIsBoolean16 = delete (ANY + ANY1); var ResultIsBoolean17 = delete (null + undefined); ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsBoolean18 = delete (null + null); ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsBoolean19 = delete (undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. // multiple delete operators var ResultIsBoolean20 = delete delete ANY; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt index 363892227f..d27497d349 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.errors.txt @@ -10,7 +10,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class Base2 { @@ -23,10 +23,10 @@ var r2 = () => super(); // error for misplaced super call (nested function) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class Derived3 extends Base2 { @@ -35,10 +35,10 @@ var r = function () { super() } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } class Derived4 extends Base2 { diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt index 35b6ca92c1..a9ab1edf2a 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt @@ -2,24 +2,24 @@ class Base { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set x(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } // error class Derived extends Base { ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Types of property 'x' are incompatible: -!!! Type '() => number' is not assignable to type 'number'. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type '() => number' is not assignable to type 'number'. x() { ~ -!!! Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. +!!! error TS2426: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. return 1; } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt b/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt index 307aad8dd2..9e6d444995 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt @@ -4,19 +4,19 @@ b() { } get c() { return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set c(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static r: string; static s() { } static get t() { return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set t(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. constructor(x) { } } diff --git a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt index 3eb2f197ca..a21d39ad38 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivateFunction1.errors.txt @@ -8,8 +8,8 @@ } class DerivedClass extends BaseClass { ~~~~~~~~~~~~ -!!! Class 'DerivedClass' incorrectly extends base class 'BaseClass': -!!! Private property '_init' cannot be reimplemented. +!!! error TS2416: Class 'DerivedClass' incorrectly extends base class 'BaseClass': +!!! error TS2416: Private property '_init' cannot be reimplemented. constructor() { super(); } diff --git a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt index c6d8f23058..8341410dc8 100644 --- a/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPrivates.errors.txt @@ -5,8 +5,8 @@ class Derived extends Base { ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Private property 'x' cannot be reimplemented. private x: { foo: string; bar: string; }; // error } @@ -16,7 +16,7 @@ class Derived2 extends Base2 { ~~~~~~~~ -!!! Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': -!!! Private property 'y' cannot be reimplemented. +!!! error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': +!!! error TS2418: Private property 'y' cannot be reimplemented. private static y: { foo: string; bar: string; }; // error } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt b/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt index efd8f968ea..21575f5172 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt @@ -7,20 +7,20 @@ b(a: typeof x) { } get c() { return x; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set c(v: typeof x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. d: (a: typeof x) => void; static r: typeof x; static s(a: typeof x) { } static get t() { return x; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set t(v: typeof x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static u: (a: typeof x) => void; constructor(a: typeof x) { } @@ -31,20 +31,20 @@ b(a: typeof y) { } get c() { return y; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set c(v: typeof y) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. d: (a: typeof y) => void; static r: typeof y; static s(a: typeof y) { } static get t() { return y; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set t(a: typeof y) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static u: (a: typeof y) => void; constructor(a: typeof y) { super(x) } diff --git a/tests/baselines/reference/derivedClassParameterProperties.errors.txt b/tests/baselines/reference/derivedClassParameterProperties.errors.txt index cd7d774b30..30b1fed51d 100644 --- a/tests/baselines/reference/derivedClassParameterProperties.errors.txt +++ b/tests/baselines/reference/derivedClassParameterProperties.errors.txt @@ -21,7 +21,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived3 extends Base { @@ -41,7 +41,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived5 extends Base { @@ -74,7 +74,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived8 extends Base { @@ -103,7 +103,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. +!!! error TS2376: A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties. } class Derived10 extends Base2 { diff --git a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt index 6c2625223c..6c8b064c90 100644 --- a/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsInNonConstructorMembers.errors.txt @@ -8,53 +8,53 @@ class Derived extends Base { a: super(); ~~~~~ -!!! Type expected. +!!! error TS1110: Type expected. ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors b() { super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } get C() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return 1; } set C(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } static a: super(); ~~~~~ -!!! Type expected. +!!! error TS1110: Type expected. ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors static b() { super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } static get C() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return 1; } static set C(v) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } } \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt index 86a6a4d37e..d354f05fb1 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.errors.txt @@ -14,7 +14,7 @@ constructor(public a: string) { super(this); // error ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } } @@ -22,7 +22,7 @@ constructor(public a: string) { super(() => this); // error ~~~~ -!!! 'this' cannot be referenced in current location. +!!! error TS2332: 'this' cannot be referenced in current location. } } diff --git a/tests/baselines/reference/derivedClassTransitivity.errors.txt b/tests/baselines/reference/derivedClassTransitivity.errors.txt index c5e60abe5d..65ed3799ce 100644 --- a/tests/baselines/reference/derivedClassTransitivity.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity.errors.txt @@ -18,10 +18,10 @@ var e: E; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'foo' are incompatible: -!!! Type '(x?: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x?: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(1); var r2 = e.foo(''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity2.errors.txt b/tests/baselines/reference/derivedClassTransitivity2.errors.txt index b2b3fca897..5412bc54a3 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity2.errors.txt @@ -18,10 +18,10 @@ var e: E; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: number, y?: string) => void' is not assignable to type '(x: number, y: number) => void': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(1, 1); var r2 = e.foo(1, ''); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassTransitivity3.errors.txt b/tests/baselines/reference/derivedClassTransitivity3.errors.txt index 8013f894b3..4d500e1e52 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.errors.txt +++ b/tests/baselines/reference/derivedClassTransitivity3.errors.txt @@ -18,10 +18,10 @@ var e: E; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void': -!!! Types of parameters 'y' and 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: string, y?: number) => void' is not assignable to type '(x: string, y: string) => void': +!!! error TS2322: Types of parameters 'y' and 'y' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var r = c.foo('', ''); var r2 = e.foo('', 1); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithAny.errors.txt b/tests/baselines/reference/derivedClassWithAny.errors.txt index ca961b5e1b..e7f353a124 100644 --- a/tests/baselines/reference/derivedClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedClassWithAny.errors.txt @@ -3,7 +3,7 @@ x: number; get X(): number { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): number { return 1; } @@ -11,7 +11,7 @@ static y: number; static get Y(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } static bar(): number { @@ -23,7 +23,7 @@ x: any; get X(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } foo(): any { @@ -33,7 +33,7 @@ static y: any; static get Y(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } static bar(): any { @@ -46,7 +46,7 @@ x: string; get X(): string{ return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): string { return ''; } @@ -54,7 +54,7 @@ static y: string; static get Y(): string { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } static bar(): string { @@ -69,8 +69,8 @@ c = d; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt index c467c55309..bdafb9eae2 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt @@ -7,17 +7,17 @@ public get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } // error, not a subtype class Derived extends Base { ~~~~~~~ -!!! Class 'Derived' incorrectly extends base class 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Derived' incorrectly extends base class 'Base': +!!! error TS2416: Private property 'x' cannot be reimplemented. private x: string; private fn(): string { return ''; @@ -25,36 +25,36 @@ private get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var r = Base.x; // ok ~ -!!! Property 'x' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'x' does not exist on type 'typeof Base'. var r2 = Derived.x; // error ~ -!!! Property 'x' does not exist on type 'typeof Derived'. +!!! error TS2339: Property 'x' does not exist on type 'typeof Derived'. var r3 = Base.fn(); // ok ~~ -!!! Property 'fn' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'fn' does not exist on type 'typeof Base'. var r4 = Derived.fn(); // error ~~ -!!! Property 'fn' does not exist on type 'typeof Derived'. +!!! error TS2339: Property 'fn' does not exist on type 'typeof Derived'. var r5 = Base.a; // ok ~ -!!! Property 'a' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'a' does not exist on type 'typeof Base'. Base.a = 2; // ok ~ -!!! Property 'a' does not exist on type 'typeof Base'. +!!! error TS2339: Property 'a' does not exist on type 'typeof Base'. var r6 = Derived.a; // error ~ -!!! Property 'a' does not exist on type 'typeof Derived'. +!!! error TS2339: Property 'a' does not exist on type 'typeof Derived'. Derived.a = 2; // error ~ -!!! Property 'a' does not exist on type 'typeof Derived'. \ No newline at end of file +!!! error TS2339: Property 'a' does not exist on type 'typeof Derived'. \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt index 9d5ee12954..2be9f2ad46 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt @@ -7,18 +7,18 @@ public static get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public static set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } // BUG 847404 // should be error class Derived extends Base { ~~~~~~~ -!!! Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2418: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base': +!!! error TS2418: Private property 'x' cannot be reimplemented. private static x: string; private static fn(): string { return ''; @@ -26,28 +26,28 @@ private static get a() { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set a(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var r = Base.x; // ok var r2 = Derived.x; // error ~~~~~~~~~ -!!! Property 'Derived.x' is inaccessible. +!!! error TS2341: Property 'Derived.x' is inaccessible. var r3 = Base.fn(); // ok var r4 = Derived.fn(); // error ~~~~~~~~~~ -!!! Property 'Derived.fn' is inaccessible. +!!! error TS2341: Property 'Derived.fn' is inaccessible. var r5 = Base.a; // ok Base.a = 2; // ok var r6 = Derived.a; // error ~~~~~~~~~ -!!! Property 'Derived.a' is inaccessible. +!!! error TS2341: Property 'Derived.a' is inaccessible. Derived.a = 2; // error ~~~~~~~~~ -!!! Property 'Derived.a' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'Derived.a' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt index 2d45378870..0e20807013 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor.errors.txt @@ -11,7 +11,7 @@ var r = new Derived(); // error ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = new Derived(1); class Base2 { @@ -26,5 +26,5 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(new Date()); // ok \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt index 62dc521d94..4b568df801 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor2.errors.txt @@ -13,7 +13,7 @@ var r = new Derived(); // error ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = new Derived(1); var r3 = new Derived(1, 2); var r4 = new Derived(1, 2, 3); @@ -32,7 +32,7 @@ var d = new D(); // error ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D(new Date()); // ok var d3 = new D(new Date(), new Date()); var d4 = new D(new Date(), new Date(), new Date()); \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt index 5e524399ca..e3a6207b10 100644 --- a/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt +++ b/tests/baselines/reference/derivedClassWithoutExplicitConstructor3.errors.txt @@ -21,10 +21,10 @@ var r = new Derived(); // error ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = new Derived2(1); // error ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r3 = new Derived('', ''); class Base2 { @@ -48,8 +48,8 @@ var d = new D2(); // error ~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new D2(new Date()); // error ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d3 = new D2(new Date(), new Date()); // ok \ No newline at end of file diff --git a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt index 8464f8b3d0..f3f13a3f8a 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt @@ -3,7 +3,7 @@ x: T; get X(): T { return null; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): T { return null; } @@ -13,7 +13,7 @@ x: any; get X(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } foo(): any { @@ -23,7 +23,7 @@ static y: any; static get Y(): any { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } static bar(): any { @@ -36,13 +36,13 @@ x: T; get X(): T { return ''; } // error ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2323: Type 'string' is not assignable to type 'T'. foo(): T { return ''; // error ~~ -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2323: Type 'string' is not assignable to type 'T'. } } @@ -53,7 +53,7 @@ c = d; c = e; ~ -!!! Type 'E' is not assignable to type 'C': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r = c.foo(); // e.foo would return string \ No newline at end of file diff --git a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt index cdde532333..827d14dc80 100644 --- a/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt +++ b/tests/baselines/reference/derivedInterfaceCallSignature.errors.txt @@ -11,9 +11,9 @@ interface D3SvgArea extends D3SvgPath { ~~~~~~~~~ -!!! Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath': -!!! Types of property 'x' are incompatible: -!!! Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. +!!! error TS2429: Interface 'D3SvgArea' incorrectly extends interface 'D3SvgPath': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '(x: (data: any, index?: number) => number) => D3SvgArea' is not assignable to type '() => (data: any, index?: number) => number'. x(x: (data: any, index?: number) => number): D3SvgArea; y(y: (data: any, index?: number) => number): D3SvgArea; y0(): (data: any, index?: number) => number; diff --git a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt index 444ee24537..9c38811451 100644 --- a/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt +++ b/tests/baselines/reference/derivedInterfaceIncompatibleWithBaseIndexer.errors.txt @@ -7,40 +7,40 @@ interface Derived extends Base { 1: { y: number } // error ~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property '1' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. ~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +!!! error TS2412: Property '1' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. } interface Derived2 extends Base { '1': { y: number } // error ~~~~~~~~~~~~~~~~~~ -!!! Property ''1'' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property ''1'' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. ~~~~~~~~~~~~~~~~~~ -!!! Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +!!! error TS2412: Property ''1'' of type '{ y: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. } interface Derived3 extends Base { foo: { y: number } // error ~~~~~~~~~~~~~~~~~~ -!!! Property 'foo' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property 'foo' of type '{ y: number; }' is not assignable to string index type '{ x: number; }'. } interface Derived4 extends Base { foo(): { x: number } // error ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'foo' of type '() => { x: number; }' is not assignable to string index type '{ x: number; }'. +!!! error TS2411: Property 'foo' of type '() => { x: number; }' is not assignable to string index type '{ x: number; }'. } // satisifies string indexer but not numeric indexer interface Derived5 extends Base { 1: { x: number } // error ~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ x: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. +!!! error TS2412: Property '1' of type '{ x: number; }' is not assignable to numeric index type '{ x: number; y: number; }'. } interface Derived5 extends Base { '1': { x: number } // error ~~~ -!!! Duplicate identifier ''1''. +!!! error TS2300: Duplicate identifier ''1''. } \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt b/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt index cf63d1a719..940211b880 100644 --- a/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt +++ b/tests/baselines/reference/derivedTypeCallingBaseImplWithOptionalParams.errors.txt @@ -13,4 +13,4 @@ var y: MyClass = new MyClass(); y.myMethod(); // error ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt index 9247d98d03..043aa71ca6 100644 --- a/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt +++ b/tests/baselines/reference/derivedTypeIncompatibleSignatures.errors.txt @@ -21,9 +21,9 @@ interface F extends E { ~ -!!! Interface 'F' incorrectly extends interface 'E': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'F' incorrectly extends interface 'E': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. [a: string]: number; // Number is not a subtype of string. Should error. } @@ -33,8 +33,8 @@ interface H extends G { ~ -!!! Interface 'H' incorrectly extends interface 'G': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'H' incorrectly extends interface 'G': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. [a: number]: number; // Should error for the same reason } \ No newline at end of file diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt index 72b6e60b05..bd960be927 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.errors.txt @@ -6,6 +6,6 @@ /// return () => message + this.name; ~~~~ -!!! Property 'name' does not exist on type 'TestFile'. +!!! error TS2339: Property 'name' does not exist on type 'TestFile'. } } \ No newline at end of file diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt index 1afac3232e..404823d79c 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.errors.txt @@ -7,6 +7,6 @@ return () => message + this.name; ~~~~ -!!! Property 'name' does not exist on type 'TestFile'. +!!! error TS2339: Property 'name' does not exist on type 'TestFile'. } } \ No newline at end of file diff --git a/tests/baselines/reference/directReferenceToNull.errors.txt b/tests/baselines/reference/directReferenceToNull.errors.txt index 23a280fc2e..755175a5b6 100644 --- a/tests/baselines/reference/directReferenceToNull.errors.txt +++ b/tests/baselines/reference/directReferenceToNull.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/conformance/types/primitives/null/directReferenceToNull.ts (1 errors) ==== var x: Null; ~~~~ -!!! Cannot find name 'Null'. \ No newline at end of file +!!! error TS2304: Cannot find name 'Null'. \ No newline at end of file diff --git a/tests/baselines/reference/directReferenceToUndefined.errors.txt b/tests/baselines/reference/directReferenceToUndefined.errors.txt index 1534b27e02..0753cbb3c8 100644 --- a/tests/baselines/reference/directReferenceToUndefined.errors.txt +++ b/tests/baselines/reference/directReferenceToUndefined.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/conformance/types/primitives/undefined/directReferenceToUndefined.ts (1 errors) ==== var x: Undefined; ~~~~~~~~~ -!!! Cannot find name 'Undefined'. +!!! error TS2304: Cannot find name 'Undefined'. var y = undefined; \ No newline at end of file diff --git a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt index fdf2729661..0320fdb599 100644 --- a/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt +++ b/tests/baselines/reference/dontShowCompilerGeneratedMembers.errors.txt @@ -1,16 +1,16 @@ ==== tests/cases/compiler/dontShowCompilerGeneratedMembers.ts (5 errors) ==== var f: { ~ -!!! Type 'number' is not assignable to type '{ <>(): any; x: number; }': -!!! Property 'x' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ <>(): any; x: number; }': +!!! error TS2322: Property 'x' is missing in type 'Number'. x: number; <- ~ -!!! Type parameter list cannot be empty. +!!! error TS1098: Type parameter list cannot be empty. ~ -!!! '(' expected. +!!! error TS1005: '(' expected. ~ -!!! Type parameter declaration expected. +!!! error TS1139: Type parameter declaration expected. }; ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/dottedModuleName.errors.txt b/tests/baselines/reference/dottedModuleName.errors.txt index 7308aa980f..3d02611aa0 100644 --- a/tests/baselines/reference/dottedModuleName.errors.txt +++ b/tests/baselines/reference/dottedModuleName.errors.txt @@ -3,11 +3,11 @@ export module N { export function f(x:number)=>2*x; ~~ -!!! Block or ';' expected. +!!! error TS1144: Block or ';' expected. ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. export module X.Y.Z { export var v2=f(v); } diff --git a/tests/baselines/reference/duplicateClassElements.errors.txt b/tests/baselines/reference/duplicateClassElements.errors.txt index 7822af473e..25be20de9b 100644 --- a/tests/baselines/reference/duplicateClassElements.errors.txt +++ b/tests/baselines/reference/duplicateClassElements.errors.txt @@ -3,80 +3,80 @@ public a; public a; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. public b() { } public b() { ~~~~~~~~~~~~ } ~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. public x; get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. return 10; } set x(_x: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "Hello"; } set y(_y: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public z() { } get z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'z'. +!!! error TS2300: Duplicate identifier 'z'. return "Hello"; } set z(_y: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'z'. +!!! error TS2300: Duplicate identifier 'z'. } get x2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } set x2(_x: number) { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public x2; ~~ -!!! Duplicate identifier 'x2'. +!!! error TS2300: Duplicate identifier 'x2'. get z2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "Hello"; } set z2(_y: string) { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public z2() { ~~ -!!! Duplicate identifier 'z2'. +!!! error TS2300: Duplicate identifier 'z2'. } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateExportAssignments.errors.txt b/tests/baselines/reference/duplicateExportAssignments.errors.txt index ebaba36307..8557371682 100644 --- a/tests/baselines/reference/duplicateExportAssignments.errors.txt +++ b/tests/baselines/reference/duplicateExportAssignments.errors.txt @@ -3,22 +3,22 @@ var y = 20; export = x; ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo2.ts (2 errors) ==== var x = 10; class y {}; export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo3.ts (2 errors) ==== module x { @@ -29,15 +29,15 @@ } export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo4.ts (2 errors) ==== export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. function x(){ return 42; } @@ -46,7 +46,7 @@ } export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. ==== tests/cases/conformance/externalModules/foo5.ts (3 errors) ==== var x = 5; @@ -54,11 +54,11 @@ var z = {}; export = x; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = y; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = z; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt index f20e5d626e..754af96105 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt @@ -3,24 +3,24 @@ try { } catch (e) { function v() { } ~ -!!! Duplicate identifier 'v'. +!!! error TS2300: Duplicate identifier 'v'. } function w() { } try { } catch (e) { var w; ~ -!!! Duplicate identifier 'w'. +!!! error TS2300: Duplicate identifier 'w'. } try { } catch (e) { var x; function x() { } // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. function e() { } // error var p: string; var p: number; // error ~ -!!! Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt index fee03fe780..445bed8e21 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt @@ -5,7 +5,7 @@ module M { export class I { } // error ~ -!!! Duplicate identifier 'I'. +!!! error TS2300: Duplicate identifier 'I'. } module M { @@ -14,7 +14,7 @@ module M { export class f { } // error ~ -!!! Duplicate identifier 'f'. +!!! error TS2300: Duplicate identifier 'f'. } module M { @@ -45,7 +45,7 @@ module Foo { export var x: number; // error for redeclaring var in a different parent ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module N { diff --git a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt index be2e3d0e6b..fa8ae367cb 100644 --- a/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt +++ b/tests/baselines/reference/duplicateInterfaceMembers1.errors.txt @@ -3,6 +3,6 @@ x: number; x: number; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel1.errors.txt b/tests/baselines/reference/duplicateLabel1.errors.txt index 7503b9b278..90d198c060 100644 --- a/tests/baselines/reference/duplicateLabel1.errors.txt +++ b/tests/baselines/reference/duplicateLabel1.errors.txt @@ -2,6 +2,6 @@ target: target: ~~~~~~ -!!! Duplicate label 'target' +!!! error TS1114: Duplicate label 'target' while (true) { } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel2.errors.txt b/tests/baselines/reference/duplicateLabel2.errors.txt index da40c01d52..12d0789f63 100644 --- a/tests/baselines/reference/duplicateLabel2.errors.txt +++ b/tests/baselines/reference/duplicateLabel2.errors.txt @@ -3,7 +3,7 @@ while (true) { target: ~~~~~~ -!!! Duplicate label 'target' +!!! error TS1114: Duplicate label 'target' while (true) { } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLocalVariable1.errors.txt b/tests/baselines/reference/duplicateLocalVariable1.errors.txt index 3bddf320db..471d7b2ac6 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable1.errors.txt @@ -185,7 +185,7 @@ var bytes = []; for (var i = 0; i < 14; i++) { ~ -!!! Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. bytes.push(fb.readByte()); } var expected = [0xEF, 0xBB, 0xBF, 0x54, 0xC3, 0xA8, 0xE1, 0xB4, 0xA3, 0xE2, 0x80, 0xA0, 0x0D, 0x0A]; diff --git a/tests/baselines/reference/duplicateLocalVariable2.errors.txt b/tests/baselines/reference/duplicateLocalVariable2.errors.txt index d176a82608..e29afd3cd2 100644 --- a/tests/baselines/reference/duplicateLocalVariable2.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable2.errors.txt @@ -27,7 +27,7 @@ var bytes = []; for (var i = 0; i < 14; i++) { ~ -!!! Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. bytes.push(fb.readByte()); } var expected = [0xEF]; diff --git a/tests/baselines/reference/duplicateLocalVariable3.errors.txt b/tests/baselines/reference/duplicateLocalVariable3.errors.txt index b99d077229..6927ee8619 100644 --- a/tests/baselines/reference/duplicateLocalVariable3.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable3.errors.txt @@ -11,5 +11,5 @@ var z = 3; var z = ""; ~ -!!! Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLocalVariable4.errors.txt b/tests/baselines/reference/duplicateLocalVariable4.errors.txt index 6038986971..53f09259c9 100644 --- a/tests/baselines/reference/duplicateLocalVariable4.errors.txt +++ b/tests/baselines/reference/duplicateLocalVariable4.errors.txt @@ -6,4 +6,4 @@ var x = E; var x = E.a; ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'typeof E', but here has type 'E'. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateNumericIndexers.errors.txt b/tests/baselines/reference/duplicateNumericIndexers.errors.txt index 7443887755..a728f6904f 100644 --- a/tests/baselines/reference/duplicateNumericIndexers.errors.txt +++ b/tests/baselines/reference/duplicateNumericIndexers.errors.txt @@ -5,46 +5,46 @@ [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface String { [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface Array { [x: number]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [x: number]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } class C { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface I { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } var a: { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt index 51e9bae840..52d4fabc0c 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt +++ b/tests/baselines/reference/duplicateObjectLiteralProperty.errors.txt @@ -4,17 +4,17 @@ b: true, // OK a: 56, // Duplicate ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. \u0061: "ss", // Duplicate ~~~~~~ -!!! Duplicate identifier '\u0061'. +!!! error TS2300: Duplicate identifier '\u0061'. a: { ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. c: 1, "c": 56, // Duplicate ~~~ -!!! Duplicate identifier '"c"'. +!!! error TS2300: Duplicate identifier '"c"'. } }; @@ -22,16 +22,16 @@ var y = { get a() { return 0; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set a(v: number) { }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. get a() { return 0; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! An object literal cannot have multiple get/set accessors with the same name. +!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. }; \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt index e184b7761e..d24c00e5f0 100644 --- a/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt +++ b/tests/baselines/reference/duplicatePropertiesInStrictMode.errors.txt @@ -4,7 +4,7 @@ x: 1, x: 2 ~ -!!! An object literal cannot have multiple properties with the same name in strict mode. +!!! error TS1117: An object literal cannot have multiple properties with the same name in strict mode. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicatePropertyNames.errors.txt b/tests/baselines/reference/duplicatePropertyNames.errors.txt index 6e9f95e0c4..de5928cfa6 100644 --- a/tests/baselines/reference/duplicatePropertyNames.errors.txt +++ b/tests/baselines/reference/duplicatePropertyNames.errors.txt @@ -5,7 +5,7 @@ foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } interface String { @@ -17,53 +17,53 @@ foo: T; foo: T; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } class C { foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. bar(x) { } bar(x) { } ~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. baz = () => { } baz = () => { } ~~~ -!!! Duplicate identifier 'baz'. +!!! error TS2300: Duplicate identifier 'baz'. } interface I { foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. } var a: { foo: string; foo: string; ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. bar: () => {}; bar: () => {}; ~~~ -!!! Duplicate identifier 'bar'. +!!! error TS2300: Duplicate identifier 'bar'. } var b = { foo: '', foo: '', ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. bar: () => { }, bar: () => { } ~~~ -!!! Duplicate identifier 'bar'. +!!! error TS2300: Duplicate identifier 'bar'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateStringIndexers.errors.txt b/tests/baselines/reference/duplicateStringIndexers.errors.txt index f4cfe243bd..aea649b07a 100644 --- a/tests/baselines/reference/duplicateStringIndexers.errors.txt +++ b/tests/baselines/reference/duplicateStringIndexers.errors.txt @@ -6,42 +6,42 @@ [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface String { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface Array { [x: string]: T; [x: string]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } class C { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface I { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } var a: { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt index 9fdd666880..f66e9b4d56 100644 --- a/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt +++ b/tests/baselines/reference/duplicateStringNamedProperty1.errors.txt @@ -3,5 +3,5 @@ "artist": string; artist: string; ~~~~~~ -!!! Duplicate identifier 'artist'. +!!! error TS2300: Duplicate identifier 'artist'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt index a42b1c0b8b..bddddb0018 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt @@ -24,28 +24,28 @@ module N2 { interface I { } ~ -!!! Individual declarations in merged declaration I must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration I must be all exported or all local. export interface I { } // error ~ -!!! Individual declarations in merged declaration I must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration I must be all exported or all local. export interface E { } ~ -!!! Individual declarations in merged declaration E must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration E must be all exported or all local. interface E { } // error ~ -!!! Individual declarations in merged declaration E must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration E must be all exported or all local. } // Should report error only once for instantiated module module M { module inst { ~~~~ -!!! Individual declarations in merged declaration inst must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration inst must be all exported or all local. var t; } export module inst { // one error ~~~~ -!!! Individual declarations in merged declaration inst must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration inst must be all exported or all local. var t; } } @@ -54,41 +54,41 @@ module M2 { var v: string; ~ -!!! Individual declarations in merged declaration v must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration v must be all exported or all local. export var v: string; // one error (visibility) ~ -!!! Individual declarations in merged declaration v must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration v must be all exported or all local. var w: number; ~ -!!! Individual declarations in merged declaration w must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration w must be all exported or all local. export var w: string; // two errors (visibility and type mismatch) ~ -!!! Individual declarations in merged declaration w must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration w must be all exported or all local. } module M { module F { ~ -!!! Individual declarations in merged declaration F must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration F must be all exported or all local. ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged var t; } export function F() { } // Only one error for duplicate identifier (don't consider visibility) ~ -!!! Individual declarations in merged declaration F must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration F must be all exported or all local. } module M { class C { } ~ -!!! Individual declarations in merged declaration C must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration C must be all exported or all local. module C { } ~ -!!! Individual declarations in merged declaration C must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration C must be all exported or all local. export module C { // Two visibility errors (one for the clodule symbol, and one for the merged container symbol) ~ -!!! Individual declarations in merged declaration C must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration C must be all exported or all local. var t; } } @@ -96,7 +96,7 @@ // Top level interface D { } ~ -!!! Individual declarations in merged declaration D must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration D must be all exported or all local. export interface D { } ~ -!!! Individual declarations in merged declaration D must be all exported or all local. \ No newline at end of file +!!! error TS2395: Individual declarations in merged declaration D must be all exported or all local. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateTypeParameters1.errors.txt b/tests/baselines/reference/duplicateTypeParameters1.errors.txt index 798411f6b6..f5597818d6 100644 --- a/tests/baselines/reference/duplicateTypeParameters1.errors.txt +++ b/tests/baselines/reference/duplicateTypeParameters1.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/duplicateTypeParameters1.ts (1 errors) ==== function A() { } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateTypeParameters2.errors.txt b/tests/baselines/reference/duplicateTypeParameters2.errors.txt index 52c6b799e9..a8ff4b54b1 100644 --- a/tests/baselines/reference/duplicateTypeParameters2.errors.txt +++ b/tests/baselines/reference/duplicateTypeParameters2.errors.txt @@ -4,4 +4,4 @@ interface I {} ~ -!!! Duplicate identifier 'T'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'T'. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateTypeParameters3.errors.txt b/tests/baselines/reference/duplicateTypeParameters3.errors.txt index 88bbf127ab..9f45da8864 100644 --- a/tests/baselines/reference/duplicateTypeParameters3.errors.txt +++ b/tests/baselines/reference/duplicateTypeParameters3.errors.txt @@ -2,7 +2,7 @@ interface X { x: () => () => void; ~ -!!! Duplicate identifier 'A'. +!!! error TS2300: Duplicate identifier 'A'. } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateVarAndImport2.errors.txt b/tests/baselines/reference/duplicateVarAndImport2.errors.txt index b6f52fc23c..6ba089d524 100644 --- a/tests/baselines/reference/duplicateVarAndImport2.errors.txt +++ b/tests/baselines/reference/duplicateVarAndImport2.errors.txt @@ -4,4 +4,4 @@ module M { export var x = 1; } import a = M; ~~~~~~~~~~~~~ -!!! Import declaration conflicts with local declaration of 'a' \ No newline at end of file +!!! error TS2440: Import declaration conflicts with local declaration of 'a' \ No newline at end of file diff --git a/tests/baselines/reference/duplicateVariablesWithAny.errors.txt b/tests/baselines/reference/duplicateVariablesWithAny.errors.txt index 0cfc4b1a72..9e0d8ef28b 100644 --- a/tests/baselines/reference/duplicateVariablesWithAny.errors.txt +++ b/tests/baselines/reference/duplicateVariablesWithAny.errors.txt @@ -3,23 +3,23 @@ var x: any; var x = 2; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. var y = ""; var y; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. module N { var x: any; var x = 2; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'any', but here has type 'number'. var y = ""; var y; //error ~ -!!! Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. } var z: any; diff --git a/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt b/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt index 5f9d572747..d45e3fcba7 100644 --- a/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateVarsAcrossFileBoundaries.errors.txt @@ -5,19 +5,19 @@ ==== tests/cases/compiler/duplicateVarsAcrossFileBoundaries_1.ts (1 errors) ==== var x = true; ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. var z = 3; ==== tests/cases/compiler/duplicateVarsAcrossFileBoundaries_2.ts (3 errors) ==== var x = ""; ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. var y = 3; ~ -!!! Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. var z = false; ~ -!!! Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. ==== tests/cases/compiler/duplicateVarsAcrossFileBoundaries_3.ts (0 errors) ==== var x = 0; diff --git a/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt b/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt index 0df438756c..84b3b1acfa 100644 --- a/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt +++ b/tests/baselines/reference/emitThisInSuperMethodCall.errors.txt @@ -10,7 +10,7 @@ function inner() { super.sayHello(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } }; } @@ -19,7 +19,7 @@ () => { super.sayHello(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } } } @@ -27,7 +27,7 @@ function inner() { super.sayHello(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } } } diff --git a/tests/baselines/reference/emptyGenericParamList.errors.txt b/tests/baselines/reference/emptyGenericParamList.errors.txt index 841c41be08..ac646874c1 100644 --- a/tests/baselines/reference/emptyGenericParamList.errors.txt +++ b/tests/baselines/reference/emptyGenericParamList.errors.txt @@ -2,6 +2,6 @@ class I {} var x: I<>; ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~ -!!! Generic type 'I' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'I' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/emptyMemberAccess.errors.txt b/tests/baselines/reference/emptyMemberAccess.errors.txt index 19c24099d9..2ea7f67be9 100644 --- a/tests/baselines/reference/emptyMemberAccess.errors.txt +++ b/tests/baselines/reference/emptyMemberAccess.errors.txt @@ -3,7 +3,7 @@ ().toString(); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/emptyTypeArgumentList.errors.txt b/tests/baselines/reference/emptyTypeArgumentList.errors.txt index e05930401f..1c793ac8de 100644 --- a/tests/baselines/reference/emptyTypeArgumentList.errors.txt +++ b/tests/baselines/reference/emptyTypeArgumentList.errors.txt @@ -2,6 +2,6 @@ function foo() { } foo<>(); ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt b/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt index aad58ddfdc..d349011aff 100644 --- a/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt +++ b/tests/baselines/reference/emptyTypeArgumentListWithNew.errors.txt @@ -2,6 +2,6 @@ class foo { } new foo<>(); ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignability.errors.txt b/tests/baselines/reference/enumAssignability.errors.txt index 3a581b3cd1..cf8b829111 100644 --- a/tests/baselines/reference/enumAssignability.errors.txt +++ b/tests/baselines/reference/enumAssignability.errors.txt @@ -9,10 +9,10 @@ e = f; ~ -!!! Type 'F' is not assignable to type 'E'. +!!! error TS2323: Type 'F' is not assignable to type 'E'. f = e; ~ -!!! Type 'E' is not assignable to type 'F'. +!!! error TS2323: Type 'E' is not assignable to type 'F'. e = 1; // ok f = 1; // ok var x: number = e; // ok @@ -33,72 +33,72 @@ var b: number = e; // ok var c: string = e; ~ -!!! Type 'E' is not assignable to type 'string'. +!!! error TS2323: Type 'E' is not assignable to type 'string'. var d: boolean = e; ~ -!!! Type 'E' is not assignable to type 'boolean'. +!!! error TS2323: Type 'E' is not assignable to type 'boolean'. var ee: Date = e; ~~ -!!! Type 'E' is not assignable to type 'Date': -!!! Property 'toDateString' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'Date': +!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var f: any = e; // ok var g: void = e; ~ -!!! Type 'E' is not assignable to type 'void'. +!!! error TS2323: Type 'E' is not assignable to type 'void'. var h: Object = e; var i: {} = e; var j: () => {} = e; ~ -!!! Type 'E' is not assignable to type '() => {}'. +!!! error TS2323: Type 'E' is not assignable to type '() => {}'. var k: Function = e; ~ -!!! Type 'E' is not assignable to type 'Function': -!!! Property 'apply' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'Function': +!!! error TS2322: Property 'apply' is missing in type 'Number'. var l: (x: number) => string = e; ~ -!!! Type 'E' is not assignable to type '(x: number) => string'. +!!! error TS2323: Type 'E' is not assignable to type '(x: number) => string'. ac = e; ~~ -!!! Type 'E' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'Number'. ai = e; ~~ -!!! Type 'E' is not assignable to type 'I': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'I': +!!! error TS2322: Property 'foo' is missing in type 'Number'. var m: number[] = e; ~ -!!! Type 'E' is not assignable to type 'number[]': -!!! Property 'length' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'number[]': +!!! error TS2322: Property 'length' is missing in type 'Number'. var n: { foo: string } = e; ~ -!!! Type 'E' is not assignable to type '{ foo: string; }': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type '{ foo: string; }': +!!! error TS2322: Property 'foo' is missing in type 'Number'. var o: (x: T) => T = e; ~ -!!! Type 'E' is not assignable to type '(x: T) => T'. +!!! error TS2323: Type 'E' is not assignable to type '(x: T) => T'. var p: Number = e; var q: String = e; ~ -!!! Type 'E' is not assignable to type 'String': -!!! Property 'charAt' is missing in type 'Number'. +!!! error TS2322: Type 'E' is not assignable to type 'String': +!!! error TS2322: Property 'charAt' is missing in type 'Number'. function foo(x: T, y: U, z: V) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x = e; ~ -!!! Type 'E' is not assignable to type 'T'. +!!! error TS2323: Type 'E' is not assignable to type 'T'. y = e; ~ -!!! Type 'E' is not assignable to type 'U'. +!!! error TS2323: Type 'E' is not assignable to type 'U'. z = e; ~ -!!! Type 'E' is not assignable to type 'V'. +!!! error TS2323: Type 'E' is not assignable to type 'V'. var a: A = e; ~ -!!! Type 'E' is not assignable to type 'A'. +!!! error TS2323: Type 'E' is not assignable to type 'A'. var b: B = e; ~ -!!! Type 'E' is not assignable to type 'B'. +!!! error TS2323: Type 'E' is not assignable to type 'B'. } } \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt b/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt index de9232d72b..30910fc359 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt +++ b/tests/baselines/reference/enumAssignabilityInInheritance.errors.txt @@ -104,11 +104,11 @@ var r4 = foo16(E.A); ~~ -!!! Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. declare function foo17(x: {}): {}; declare function foo17(x: E): E; var r4 = foo16(E.A); ~~ -!!! Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'r4' must be of type 'E', but here has type 'Object'. \ No newline at end of file diff --git a/tests/baselines/reference/enumAssignmentCompat.errors.txt b/tests/baselines/reference/enumAssignmentCompat.errors.txt index 7e4c97231e..e04b3a343f 100644 --- a/tests/baselines/reference/enumAssignmentCompat.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat.errors.txt @@ -26,24 +26,24 @@ var y: typeof W = W; var z: number = W; // error ~ -!!! Type 'typeof W' is not assignable to type 'number'. +!!! error TS2323: Type 'typeof W' is not assignable to type 'number'. var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! Type 'W' is not assignable to type 'typeof W': -!!! Property 'D' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'typeof W': +!!! error TS2322: Property 'D' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! Type 'number' is not assignable to type 'typeof W'. +!!! error TS2323: Type 'number' is not assignable to type 'typeof W'. var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! Type 'W' is not assignable to type 'WStatic': -!!! Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'WStatic': +!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ -!!! Type 'number' is not assignable to type 'WStatic'. +!!! error TS2323: Type 'number' is not assignable to type 'WStatic'. var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumAssignmentCompat2.errors.txt b/tests/baselines/reference/enumAssignmentCompat2.errors.txt index 62d4ef0d04..14c4927ef0 100644 --- a/tests/baselines/reference/enumAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/enumAssignmentCompat2.errors.txt @@ -25,24 +25,24 @@ var y: typeof W = W; var z: number = W; // error ~ -!!! Type 'typeof W' is not assignable to type 'number'. +!!! error TS2323: Type 'typeof W' is not assignable to type 'number'. var a: number = W.a; var b: typeof W = W.a; // error ~ -!!! Type 'W' is not assignable to type 'typeof W': -!!! Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'typeof W': +!!! error TS2322: Property 'a' is missing in type 'Number'. var c: typeof W.a = W.a; var d: typeof W = 3; // error ~ -!!! Type 'number' is not assignable to type 'typeof W'. +!!! error TS2323: Type 'number' is not assignable to type 'typeof W'. var e: typeof W.a = 4; var f: WStatic = W.a; // error ~ -!!! Type 'W' is not assignable to type 'WStatic': -!!! Property 'a' is missing in type 'Number'. +!!! error TS2322: Type 'W' is not assignable to type 'WStatic': +!!! error TS2322: Property 'a' is missing in type 'Number'. var g: WStatic = 5; // error ~ -!!! Type 'number' is not assignable to type 'WStatic'. +!!! error TS2323: Type 'number' is not assignable to type 'WStatic'. var h: W = 3; var i: W = W.a; i = W.a; diff --git a/tests/baselines/reference/enumBasics1.errors.txt b/tests/baselines/reference/enumBasics1.errors.txt index 6d9229341e..acc3e68930 100644 --- a/tests/baselines/reference/enumBasics1.errors.txt +++ b/tests/baselines/reference/enumBasics1.errors.txt @@ -26,7 +26,7 @@ */ E.A.A; // should error ~ -!!! Property 'A' does not exist on type 'E'. +!!! error TS2339: Property 'A' does not exist on type 'E'. enum E2 { @@ -37,6 +37,6 @@ enum E2 { // should error for continued autonumbering C, ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. D, } \ No newline at end of file diff --git a/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt b/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt index 7fb893354a..a470b7d22d 100644 --- a/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt +++ b/tests/baselines/reference/enumConflictsWithGlobalIdentifier.errors.txt @@ -4,8 +4,8 @@ } var x = IgnoreRulesSpecific. ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'IgnoreRulesSpecific'. +!!! error TS2304: Cannot find name 'IgnoreRulesSpecific'. var y = Position.IgnoreRulesSpecific; ~ -!!! ',' expected. +!!! error TS1005: ',' expected. \ No newline at end of file diff --git a/tests/baselines/reference/enumConstantMembers.errors.txt b/tests/baselines/reference/enumConstantMembers.errors.txt index ac77e2b7b4..40a800961d 100644 --- a/tests/baselines/reference/enumConstantMembers.errors.txt +++ b/tests/baselines/reference/enumConstantMembers.errors.txt @@ -12,7 +12,7 @@ a = 0.1, b // Error because 0.1 is not a constant ~ -!!! Enum member must have initializer. +!!! error TS1061: Enum member must have initializer. } declare enum E4 { @@ -20,5 +20,5 @@ b = -1, c = 0.1 // Not a constant ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. } \ No newline at end of file diff --git a/tests/baselines/reference/enumErrors.errors.txt b/tests/baselines/reference/enumErrors.errors.txt index 69993d8109..ce6e4e3790 100644 --- a/tests/baselines/reference/enumErrors.errors.txt +++ b/tests/baselines/reference/enumErrors.errors.txt @@ -2,22 +2,22 @@ // Enum named with PredefinedTypes enum any { } ~~~ -!!! Enum name cannot be 'any' +!!! error TS2431: Enum name cannot be 'any' enum number { } ~~~~~~ -!!! Enum name cannot be 'number' +!!! error TS2431: Enum name cannot be 'number' enum string { } ~~~~~~ -!!! Enum name cannot be 'string' +!!! error TS2431: Enum name cannot be 'string' enum boolean { } ~~~~~~~ -!!! Enum name cannot be 'boolean' +!!! error TS2431: Enum name cannot be 'boolean' // Enum with computed member initializer of type Number enum E5 { C = new Number(30) ~~~~~~~~~~~~~~ -!!! Type 'Number' is not assignable to type 'E5'. +!!! error TS2323: Type 'Number' is not assignable to type 'E5'. } enum E9 { @@ -30,25 +30,25 @@ enum E10 { A = E9.A, ~~~~ -!!! Type 'E9' is not assignable to type 'E10'. +!!! error TS2323: Type 'E9' is not assignable to type 'E10'. B = E9.B ~~~~ -!!! Type 'E9' is not assignable to type 'E10'. +!!! error TS2323: Type 'E9' is not assignable to type 'E10'. } // Enum with computed member intializer of other types enum E11 { A = '', ~~ -!!! Type 'string' is not assignable to type 'E11'. +!!! error TS2323: Type 'string' is not assignable to type 'E11'. B = new Date(), ~~~~~~~~~~ -!!! Type 'Date' is not assignable to type 'E11'. +!!! error TS2323: Type 'Date' is not assignable to type 'E11'. C = window, ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. D = {} ~~ -!!! Type '{}' is not assignable to type 'E11'. +!!! error TS2323: Type '{}' is not assignable to type 'E11'. } \ No newline at end of file diff --git a/tests/baselines/reference/enumGenericTypeClash.errors.txt b/tests/baselines/reference/enumGenericTypeClash.errors.txt index df7f1d77ed..2ecbc0535c 100644 --- a/tests/baselines/reference/enumGenericTypeClash.errors.txt +++ b/tests/baselines/reference/enumGenericTypeClash.errors.txt @@ -2,5 +2,5 @@ class X { } enum X { MyVal } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. \ No newline at end of file diff --git a/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt b/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt index 0ddd45d5ed..a52345a41f 100644 --- a/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt +++ b/tests/baselines/reference/enumIdenticalIdentifierValues.errors.txt @@ -3,5 +3,5 @@ 1, 1.0 ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. } \ No newline at end of file diff --git a/tests/baselines/reference/enumInitializersWithExponents.errors.txt b/tests/baselines/reference/enumInitializersWithExponents.errors.txt index 60649475f7..55cab50c0c 100644 --- a/tests/baselines/reference/enumInitializersWithExponents.errors.txt +++ b/tests/baselines/reference/enumInitializersWithExponents.errors.txt @@ -5,10 +5,10 @@ b = 1e25, // ok c = 1e-3, // error ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. d = 1e-9, // error ~ -!!! Ambient enum elements can only have integer literal initializers. +!!! error TS1066: Ambient enum elements can only have integer literal initializers. e = 1e0, // ok f = 1e+25 // ok } \ No newline at end of file diff --git a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt index 28798c1e47..2e96dbaeca 100644 --- a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt +++ b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.errors.txt @@ -18,7 +18,7 @@ [x: string]: string; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'string'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'string'. } @@ -26,7 +26,7 @@ [x: string]: boolean; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'boolean'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'boolean'. } @@ -34,7 +34,7 @@ [x: string]: Date; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'Date'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'Date'. } @@ -42,7 +42,7 @@ [x: string]: RegExp; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'RegExp'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'RegExp'. } @@ -50,7 +50,7 @@ [x: string]: { bar: number }; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type '{ bar: number; }'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type '{ bar: number; }'. } @@ -58,7 +58,7 @@ [x: string]: number[]; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'number[]'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'number[]'. } @@ -66,7 +66,7 @@ [x: string]: I8; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'I8'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'I8'. } class A { foo: number; } @@ -74,7 +74,7 @@ [x: string]: A; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'A'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'A'. } class A2 { foo: T; } @@ -82,7 +82,7 @@ [x: string]: A2; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'A2'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'A2'. } @@ -90,7 +90,7 @@ [x: string]: (x) => number; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type '(x: any) => number'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type '(x: any) => number'. } @@ -98,7 +98,7 @@ [x: string]: (x: T) => T; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type '(x: T) => T'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type '(x: T) => T'. } @@ -107,7 +107,7 @@ [x: string]: E2; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'E2'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'E2'. } @@ -119,7 +119,7 @@ [x: string]: typeof f; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'typeof f'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof f'. } @@ -131,7 +131,7 @@ [x: string]: typeof c; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'typeof c'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'typeof c'. } @@ -139,17 +139,17 @@ [x: string]: T; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'T'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'T'. } interface I18 { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. [x: string]: U; foo: E; ~~~~~~~ -!!! Property 'foo' of type 'E' is not assignable to string index type 'U'. +!!! error TS2411: Property 'foo' of type 'E' is not assignable to string index type 'U'. } diff --git a/tests/baselines/reference/enumMemberResolution.errors.txt b/tests/baselines/reference/enumMemberResolution.errors.txt index 71f6f8e45b..96bf74a153 100644 --- a/tests/baselines/reference/enumMemberResolution.errors.txt +++ b/tests/baselines/reference/enumMemberResolution.errors.txt @@ -4,9 +4,9 @@ } var x = IgnoreRulesSpecific. // error ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'IgnoreRulesSpecific'. +!!! error TS2304: Cannot find name 'IgnoreRulesSpecific'. var y = 1; ~ -!!! ',' expected. +!!! error TS1005: ',' expected. var z = Position2.IgnoreRulesSpecific; // no error \ No newline at end of file diff --git a/tests/baselines/reference/enumMergingErrors.errors.txt b/tests/baselines/reference/enumMergingErrors.errors.txt index 30cf6ef18c..afbc406a87 100644 --- a/tests/baselines/reference/enumMergingErrors.errors.txt +++ b/tests/baselines/reference/enumMergingErrors.errors.txt @@ -26,7 +26,7 @@ module M1 { export enum E1 { C } ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } @@ -40,7 +40,7 @@ module M2 { export enum E1 { C } ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } diff --git a/tests/baselines/reference/enumPropertyAccess.errors.txt b/tests/baselines/reference/enumPropertyAccess.errors.txt index 6a9886c096..652abdc8a4 100644 --- a/tests/baselines/reference/enumPropertyAccess.errors.txt +++ b/tests/baselines/reference/enumPropertyAccess.errors.txt @@ -7,13 +7,13 @@ var x = Colors.Red; // type of 'x' should be 'Colors' var p = x.Green; // error ~~~~~ -!!! Property 'Green' does not exist on type 'Colors'. +!!! error TS2339: Property 'Green' does not exist on type 'Colors'. x.toFixed(); // ok // Now with generics function fill(f: B) { f.Green; // error ~~~~~ -!!! Property 'Green' does not exist on type 'B'. +!!! error TS2339: Property 'Green' does not exist on type 'B'. f.toFixed(); // ok } \ No newline at end of file diff --git a/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt b/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt index 9279067d7f..b7ad2545df 100644 --- a/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt +++ b/tests/baselines/reference/enumWithParenthesizedInitializer1.errors.txt @@ -3,4 +3,4 @@ e = -(3 } ~ -!!! ')' expected. \ No newline at end of file +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/enumWithPrimitiveName.errors.txt b/tests/baselines/reference/enumWithPrimitiveName.errors.txt index 6274cdcd43..e4376d9291 100644 --- a/tests/baselines/reference/enumWithPrimitiveName.errors.txt +++ b/tests/baselines/reference/enumWithPrimitiveName.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/enumWithPrimitiveName.ts (3 errors) ==== enum string { } ~~~~~~ -!!! Enum name cannot be 'string' +!!! error TS2431: Enum name cannot be 'string' enum number { } ~~~~~~ -!!! Enum name cannot be 'number' +!!! error TS2431: Enum name cannot be 'number' enum any { } ~~~ -!!! Enum name cannot be 'any' \ No newline at end of file +!!! error TS2431: Enum name cannot be 'any' \ No newline at end of file diff --git a/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt b/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt index 571bb6906e..14acb5af84 100644 --- a/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt +++ b/tests/baselines/reference/enumWithoutInitializerAfterComputedMember.errors.txt @@ -4,5 +4,5 @@ b = a, c ~ -!!! Enum member must have initializer. +!!! error TS1061: Enum member must have initializer. } \ No newline at end of file diff --git a/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt b/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt index d2336e905c..9a9768b5dd 100644 --- a/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt +++ b/tests/baselines/reference/enumsWithMultipleDeclarations1.errors.txt @@ -6,11 +6,11 @@ enum E { B ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } enum E { C ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } \ No newline at end of file diff --git a/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt b/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt index ef7040dd94..e282ea55ec 100644 --- a/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt +++ b/tests/baselines/reference/enumsWithMultipleDeclarations2.errors.txt @@ -10,5 +10,5 @@ enum E { C ~ -!!! In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } \ No newline at end of file diff --git a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt index 4a94b22ee7..a2e14d1c3f 100644 --- a/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt +++ b/tests/baselines/reference/errorForwardReferenceForwadingConstructor.errors.txt @@ -4,7 +4,7 @@ function f() { var d1 = new derived(); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var d2 = new derived(4); } diff --git a/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt b/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt index a015fc902a..ca87d263be 100644 --- a/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt +++ b/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt @@ -3,5 +3,5 @@ interface x extends string { } ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt index 9b19634265..6735c6bba6 100644 --- a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt +++ b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt @@ -5,7 +5,7 @@ }; x.getOwnPropertyNamess(); ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'. +!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'. Object.getOwnPropertyNamess(null); ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'getOwnPropertyNamess' does not exist on type '{ (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }'. \ No newline at end of file +!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }'. \ No newline at end of file diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt b/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt index 414fa7dc4c..a9202fb8dc 100644 --- a/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt +++ b/tests/baselines/reference/errorOnContextuallyTypedReturnType.errors.txt @@ -1,9 +1,9 @@ ==== tests/cases/compiler/errorOnContextuallyTypedReturnType.ts (2 errors) ==== var n1: () => boolean = function () { }; // expect an error here ~~ -!!! Type '() => void' is not assignable to type '() => boolean': -!!! Type 'void' is not assignable to type 'boolean'. +!!! error TS2322: Type '() => void' is not assignable to type '() => boolean': +!!! error TS2322: Type 'void' is not assignable to type 'boolean'. var n2: () => boolean = function ():boolean { }; // expect an error here ~~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. \ No newline at end of file diff --git a/tests/baselines/reference/errorSuperCalls.errors.txt b/tests/baselines/reference/errorSuperCalls.errors.txt index 7e85cc07ee..dfdfcbbf05 100644 --- a/tests/baselines/reference/errorSuperCalls.errors.txt +++ b/tests/baselines/reference/errorSuperCalls.errors.txt @@ -4,65 +4,65 @@ constructor() { super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in class member function with no base type fn() { super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in class accessor (get and set) with no base type get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. return null; } set foo(v) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in class member initializer with no base type p = super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. //super call in static class member function with no base type static fn() { super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } //super call in static class member initializer with no base type static k = super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. //super call in static class accessor (get and set) with no base type static get q() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. return null; } static set q(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } } @@ -72,7 +72,7 @@ constructor() { super(); ~ -!!! 'super' must be followed by an argument list or member access. +!!! error TS1034: 'super' must be followed by an argument list or member access. super(); } } @@ -86,30 +86,30 @@ //super call in class member initializer of derived type t = super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors fn() { //super call in class member function of derived type super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } //super call in class accessor (get and set) of derived type get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return null; } set foo(n) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } } \ No newline at end of file diff --git a/tests/baselines/reference/errorSuperPropertyAccess.errors.txt b/tests/baselines/reference/errorSuperPropertyAccess.errors.txt index 9833e64eba..9280a0d10a 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.errors.txt +++ b/tests/baselines/reference/errorSuperPropertyAccess.errors.txt @@ -6,51 +6,51 @@ constructor() { var a = super.prototype; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. var b = super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } fn() { var a = super.prototype; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. var b = super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } m = super.prototype; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. n = super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. //super static property access in static member function of class with no base type //super static property access in static member accessor(get and set) of class with no base type public static static1() { super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } public static get static2() { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. return ''; } public static set static2(n) { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.hasOwnProperty(''); ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. } } @@ -79,40 +79,40 @@ super(); super.publicMember = 1; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } fn() { var x = super.publicMember; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } get a() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = super.publicMember; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword return undefined; } set a(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. n = super.publicMember; ~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } fn2() { function inner() { super.publicFunc(); ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } var x = { test: function () { return super.publicFunc(); } ~~~~~ -!!! 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class +!!! error TS2338: 'super' property access is permitted only in a constructor, member function, or member accessor of a derived class } } } @@ -125,29 +125,29 @@ super(); super.privateMember = 1; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } fn() { var x = super.privateMember; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } get a() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = super.privateMember; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword return undefined; } set a(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. n = super.privateMember; ~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword } } @@ -159,47 +159,47 @@ static fn() { super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticMember = 3; ~~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticFunc(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'SomeBase.privateStaticFunc' is inaccessible. +!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. } static get a() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticMember = 3; ~~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticFunc(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'SomeBase.privateStaticFunc' is inaccessible. +!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. return ''; } static set a(n) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticMember = 3; ~~~~~~~~~~~~~~~~~~~ -!!! Only public methods of the base class are accessible via the 'super' keyword +!!! error TS2340: Only public methods of the base class are accessible via the 'super' keyword super.privateStaticFunc(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'SomeBase.privateStaticFunc' is inaccessible. +!!! error TS2341: Property 'SomeBase.privateStaticFunc' is inaccessible. } } // In object literal var obj = { n: super.wat, p: super.foo() }; ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. ~~~~~ -!!! 'super' can only be referenced in a derived class. +!!! error TS2335: 'super' can only be referenced in a derived class. \ No newline at end of file diff --git a/tests/baselines/reference/errorSupression1.errors.txt b/tests/baselines/reference/errorSupression1.errors.txt index f702ea6e64..cbb588dad8 100644 --- a/tests/baselines/reference/errorSupression1.errors.txt +++ b/tests/baselines/reference/errorSupression1.errors.txt @@ -4,7 +4,7 @@ var baz = Foo.b; ~ -!!! Property 'b' does not exist on type 'typeof Foo'. +!!! error TS2339: Property 'b' does not exist on type 'typeof Foo'. // Foo.b won't bind. baz.concat("y"); diff --git a/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt b/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt index 90c3f43dc4..5b08b98c96 100644 --- a/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt +++ b/tests/baselines/reference/errorTypesAsTypeArguments.errors.txt @@ -2,7 +2,7 @@ interface Foo { bar(baz: Foo): Foo; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. } \ No newline at end of file diff --git a/tests/baselines/reference/errorWithTruncatedType.errors.txt b/tests/baselines/reference/errorWithTruncatedType.errors.txt index 7d3cab5f3c..777269f4c1 100644 --- a/tests/baselines/reference/errorWithTruncatedType.errors.txt +++ b/tests/baselines/reference/errorWithTruncatedType.errors.txt @@ -11,5 +11,5 @@ // String representation of type of 'x' should be truncated in error message var s: string = x; ~ -!!! Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. +!!! error TS2323: Type '{ propertyWithAnExceedinglyLongName1: string; propertyWithAnExceedinglyLongName2: string; propert...' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/errorsInGenericTypeReference.errors.txt b/tests/baselines/reference/errorsInGenericTypeReference.errors.txt index 0dc6b5a0ab..355dab546a 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.errors.txt +++ b/tests/baselines/reference/errorsInGenericTypeReference.errors.txt @@ -12,7 +12,7 @@ var tc1 = new testClass1(); tc1.method<{ x: V }>(); // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in constructor type arguments @@ -20,98 +20,98 @@ } var tc2 = new testClass2<{ x: V }>(); // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in method return type annotation class testClass3 { testMethod1(): Foo<{ x: V }> { return null; } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. static testMethod2(): Foo<{ x: V }> { return null } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. set a(value: Foo<{ x: V }>) { } // error: could not find symbol V ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. property: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } // in function return type annotation function testFunction1(): Foo<{ x: V }> { return null; } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in paramter types function testFunction2(p: Foo<{ x: V }>) { }// error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in var type annotation var f: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in constraints class testClass4 { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. interface testClass5> { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. class testClass6 { method(): void { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } interface testInterface1 { new (a: M); // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } // in extends clause class testClass7 extends Foo<{ x: V }> { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in implements clause class testClass8 implements IFoo<{ x: V }> { } // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. // in signatures interface testInterface2 { new (a: Foo<{ x: V }>): Foo<{ x: V }>; //2x: error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. [x: string]: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. method(a: Foo<{ x: V }>): Foo<{ x: V }>; //2x: error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. property: Foo<{ x: V }>; // error: could not find symbol V ~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. } \ No newline at end of file diff --git a/tests/baselines/reference/errorsOnImportedSymbol.errors.txt b/tests/baselines/reference/errorsOnImportedSymbol.errors.txt index 9261bab93f..d341411fa4 100644 --- a/tests/baselines/reference/errorsOnImportedSymbol.errors.txt +++ b/tests/baselines/reference/errorsOnImportedSymbol.errors.txt @@ -2,10 +2,10 @@ import Sammy = require("errorsOnImportedSymbol_0"); var x = new Sammy.Sammy(); ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. var y = Sammy.Sammy(); ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. ==== tests/cases/compiler/errorsOnImportedSymbol_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/es6ClassTest.errors.txt b/tests/baselines/reference/es6ClassTest.errors.txt index 717089ddeb..a36695de5e 100644 --- a/tests/baselines/reference/es6ClassTest.errors.txt +++ b/tests/baselines/reference/es6ClassTest.errors.txt @@ -25,7 +25,7 @@ constructor(); constructor(x?, private y?:string, public z?=0) { ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. super(x); this.x = x; this.gar = 5; diff --git a/tests/baselines/reference/es6ClassTest2.errors.txt b/tests/baselines/reference/es6ClassTest2.errors.txt index 3e3fa2bbee..6ce6a70702 100644 --- a/tests/baselines/reference/es6ClassTest2.errors.txt +++ b/tests/baselines/reference/es6ClassTest2.errors.txt @@ -17,7 +17,7 @@ m1.health = 0; console.log((m5.isAlive).toString()); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. class GetSetMonster { constructor(public name: string, private _health: number) { @@ -32,14 +32,14 @@ // defines one in an object literal. get isAlive() { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this._health > 0; } // Likewise, "set" can be used to define setters. set health(value: number) { ~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. if (value < 0) { throw new Error('Health must be non-negative.') } diff --git a/tests/baselines/reference/es6ClassTest3.errors.txt b/tests/baselines/reference/es6ClassTest3.errors.txt index d666351dc9..619b3ffa54 100644 --- a/tests/baselines/reference/es6ClassTest3.errors.txt +++ b/tests/baselines/reference/es6ClassTest3.errors.txt @@ -3,10 +3,10 @@ class Visibility { public foo() { }; ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. private bar() { }; ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. private x: number; public y: number; public z: number; diff --git a/tests/baselines/reference/es6ClassTest9.errors.txt b/tests/baselines/reference/es6ClassTest9.errors.txt index 1b8be82fc9..b964532bfd 100644 --- a/tests/baselines/reference/es6ClassTest9.errors.txt +++ b/tests/baselines/reference/es6ClassTest9.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/es6ClassTest9.ts (3 errors) ==== declare class foo(); ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. function foo() {} ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/es6DeclOrdering.errors.txt b/tests/baselines/reference/es6DeclOrdering.errors.txt index 4d890d0423..1fa7aa05e0 100644 --- a/tests/baselines/reference/es6DeclOrdering.errors.txt +++ b/tests/baselines/reference/es6DeclOrdering.errors.txt @@ -6,14 +6,14 @@ public foo() { return this._store.length; ~~~~~~ -!!! Property '_store' does not exist on type 'Bar'. +!!! error TS2339: Property '_store' does not exist on type 'Bar'. } constructor(store: string) { this._store = store; // this is an error for some reason? Unresolved symbol store ~~~~~~ -!!! Property '_store' does not exist on type 'Bar'. +!!! error TS2339: Property '_store' does not exist on type 'Bar'. } } diff --git a/tests/baselines/reference/es6MemberScoping.errors.txt b/tests/baselines/reference/es6MemberScoping.errors.txt index 37c8eeb0d2..7c5c506c62 100644 --- a/tests/baselines/reference/es6MemberScoping.errors.txt +++ b/tests/baselines/reference/es6MemberScoping.errors.txt @@ -9,7 +9,7 @@ } public _store = store; // should be an error. ~~~~~ -!!! Cannot find name 'store'. +!!! error TS2304: Cannot find name 'store'. } class Foo2 { diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt index 8ff1f410b3..73e84a641c 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.errors.txt @@ -34,71 +34,71 @@ var aNumber: number = 'this is a string'; ~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. var aString: string = 9.9; ~~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var aDate: Date = 9.9; ~~~~~ -!!! Type 'number' is not assignable to type 'Date': -!!! Property 'toDateString' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Date': +!!! error TS2322: Property 'toDateString' is missing in type 'Number'. var aVoid: void = 9.9; ~~~~~ -!!! Type 'number' is not assignable to type 'void'. +!!! error TS2323: Type 'number' is not assignable to type 'void'. var anInterface: I = new D(); ~~~~~~~~~~~ -!!! Type 'D<{}>' is not assignable to type 'I': -!!! Property 'id' is missing in type 'D<{}>'. +!!! error TS2322: Type 'D<{}>' is not assignable to type 'I': +!!! error TS2322: Property 'id' is missing in type 'D<{}>'. var aClass: C = new D(); ~~~~~~ -!!! Type 'D<{}>' is not assignable to type 'C': -!!! Property 'id' is missing in type 'D<{}>'. +!!! error TS2322: Type 'D<{}>' is not assignable to type 'C': +!!! error TS2322: Property 'id' is missing in type 'D<{}>'. var aGenericClass: D = new C(); ~~~~~~~~~~~~~ -!!! Type 'C' is not assignable to type 'D': -!!! Property 'source' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'D': +!!! error TS2322: Property 'source' is missing in type 'C'. var anObjectLiteral: I = { id: 'a string' }; ~~~~~~~~~~~~~~~ -!!! Type '{ id: string; }' is not assignable to type 'I': -!!! Types of property 'id' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '{ id: string; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'id' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var anOtherObjectLiteral: { id: string } = new C(); ~~~~~~~~~~~~~~~~~~~~ -!!! Type 'C' is not assignable to type '{ id: string; }': -!!! Types of property 'id' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type '{ id: string; }': +!!! error TS2322: Types of property 'id' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var aFunction: typeof F = F2; ~~~~~~~~~ -!!! Type '(x: number) => boolean' is not assignable to type '(x: string) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var anOtherFunction: (x: string) => number = F2; ~~~~~~~~~~~~~~~ -!!! Type '(x: number) => boolean' is not assignable to type '(x: string) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: string) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var aLambda: typeof F = (x) => 'a string'; ~~~~~~~ -!!! Type '(x: string) => string' is not assignable to type '(x: string) => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: string) => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. var aModule: typeof M = N; ~~~~~~~ -!!! Type 'typeof N' is not assignable to type 'typeof M': -!!! Types of property 'A' are incompatible: -!!! Type 'typeof A' is not assignable to type 'typeof A': -!!! Type 'A' is not assignable to type 'A': -!!! Property 'name' is missing in type 'A'. +!!! error TS2322: Type 'typeof N' is not assignable to type 'typeof M': +!!! error TS2322: Types of property 'A' are incompatible: +!!! error TS2322: Type 'typeof A' is not assignable to type 'typeof A': +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Property 'name' is missing in type 'A'. var aClassInModule: M.A = new N.A(); ~~~~~~~~~~~~~~ -!!! Type 'A' is not assignable to type 'A': -!!! Property 'name' is missing in type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Property 'name' is missing in type 'A'. var aFunctionInModule: typeof M.F2 = F2; ~~~~~~~~~~~~~~~~~ -!!! Type '(x: number) => boolean' is not assignable to type '(x: number) => string': -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2322: Type '(x: number) => boolean' is not assignable to type '(x: number) => string': +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/exportAlreadySeen.errors.txt b/tests/baselines/reference/exportAlreadySeen.errors.txt index b80498feb5..a51cf97ef0 100644 --- a/tests/baselines/reference/exportAlreadySeen.errors.txt +++ b/tests/baselines/reference/exportAlreadySeen.errors.txt @@ -2,39 +2,39 @@ module M { export export var x = 1; ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export function f() { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export module N { ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export class C { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export interface I { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. } } declare module A { export export var x; ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export function f() ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export module N { ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export class C { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. export export interface I { } ~~~~~~ -!!! 'export' modifier already seen. +!!! error TS1030: 'export' modifier already seen. } } \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignDottedName.errors.txt b/tests/baselines/reference/exportAssignDottedName.errors.txt index 7faf84e114..4778bfbb62 100644 --- a/tests/baselines/reference/exportAssignDottedName.errors.txt +++ b/tests/baselines/reference/exportAssignDottedName.errors.txt @@ -2,9 +2,9 @@ import foo1 = require('./foo1'); export = foo1.x; // Error, export assignment must be identifier only ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ==== export function x(){ @@ -13,5 +13,5 @@ ~~~~~~~~~~~~~ } ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt index b1e124896e..6dc0d4552b 100644 --- a/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignImportedIdentifier.errors.txt @@ -8,7 +8,7 @@ ~~~~~~~~~~~~~ } ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== import foo1 = require('./foo1'); diff --git a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt index 7487d9547c..ba106a8d04 100644 --- a/tests/baselines/reference/exportAssignNonIdentifier.errors.txt +++ b/tests/baselines/reference/exportAssignNonIdentifier.errors.txt @@ -2,24 +2,24 @@ var x = 10; export = typeof x; // Error ~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo2.ts (1 errors) ==== export = "sausages"; // Error ~~~~~~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo3.ts (1 errors) ==== export = class Foo3 {}; // Error ~~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo4.ts (1 errors) ==== export = true; // Error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ==== tests/cases/conformance/externalModules/foo5.ts (0 errors) ==== export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript @@ -27,18 +27,18 @@ ==== tests/cases/conformance/externalModules/foo6.ts (2 errors) ==== export = void; // Error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ==== tests/cases/conformance/externalModules/foo7.ts (1 errors) ==== export = Date || String; // Error ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ==== tests/cases/conformance/externalModules/foo8.ts (1 errors) ==== export = null; // Error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignTypes.errors.txt b/tests/baselines/reference/exportAssignTypes.errors.txt index c4dca71333..2a5af5b988 100644 --- a/tests/baselines/reference/exportAssignTypes.errors.txt +++ b/tests/baselines/reference/exportAssignTypes.errors.txt @@ -24,7 +24,7 @@ var x = "test"; export = x; ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/expNumber.ts (0 errors) ==== var x = 42; diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt index ecae497202..e0d4b1139b 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.errors.txt @@ -10,4 +10,4 @@ // Invalid, as there is already an exported member. export = C1; ~~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt index 9b933cc439..4ae3452e38 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt @@ -2,7 +2,7 @@ import foo = require("./foo_0"); var x = new foo(true); // Should error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. var y = new foo({a: "test", b: 42}); // Should be OK var z: number = y.test.b; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt index 74518bb9c3..4fb06b94bc 100644 --- a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt +++ b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.errors.txt @@ -3,10 +3,10 @@ import Sammy = require('exportAssignmentOfDeclaredExternalModule_0'); var x = new Sammy(); // error to use as constructor as there is not constructor symbol ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. var y = Sammy(); // error to use interface name as call target ~~~~~ -!!! Cannot find name 'Sammy'. +!!! error TS2304: Cannot find name 'Sammy'. var z: Sammy; // no error - z is of type interface Sammy from module 'M' var a = new z(); // constructor - no error var b = z(); // call signature - no error diff --git a/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt b/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt index 2dd71ce0d0..a3b6e38a89 100644 --- a/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithDeclareAndExportModifiers.errors.txt @@ -2,6 +2,6 @@ var x; export declare export = x; ~~~~~~~~~~~~~~ -!!! An export assignment cannot have modifiers. +!!! error TS1120: An export assignment cannot have modifiers. ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt b/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt index 27b202ce0c..897b970fa7 100644 --- a/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithDeclareModifier.errors.txt @@ -2,6 +2,6 @@ var x; declare export = x; ~~~~~~~ -!!! An export assignment cannot have modifiers. +!!! error TS1120: An export assignment cannot have modifiers. ~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt b/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt index dc3d6cb4cc..90cb3f5067 100644 --- a/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithExportModifier.errors.txt @@ -2,6 +2,6 @@ var x; export export = x; ~~~~~~ -!!! An export assignment cannot have modifiers. +!!! error TS1120: An export assignment cannot have modifiers. ~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithExports.errors.txt b/tests/baselines/reference/exportAssignmentWithExports.errors.txt index 7ddda9db53..13e51e43ff 100644 --- a/tests/baselines/reference/exportAssignmentWithExports.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithExports.errors.txt @@ -3,4 +3,4 @@ class D { } export = D; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt index 396d932e35..4508311625 100644 --- a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt +++ b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.errors.txt @@ -7,5 +7,5 @@ } export = new Greeter(); ~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/exportDeclareClass1.errors.txt b/tests/baselines/reference/exportDeclareClass1.errors.txt index 6ee2bc0e09..22d416a0d2 100644 --- a/tests/baselines/reference/exportDeclareClass1.errors.txt +++ b/tests/baselines/reference/exportDeclareClass1.errors.txt @@ -2,14 +2,14 @@ export declare class eaC { static tF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. static tsF(param:any) { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. }; export declare class eaC2 { diff --git a/tests/baselines/reference/exportDeclaredModule.errors.txt b/tests/baselines/reference/exportDeclaredModule.errors.txt index ffa54e92dc..9d62978f77 100644 --- a/tests/baselines/reference/exportDeclaredModule.errors.txt +++ b/tests/baselines/reference/exportDeclaredModule.errors.txt @@ -9,5 +9,5 @@ } export = M1; ~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. \ No newline at end of file diff --git a/tests/baselines/reference/exportEqualErrorType.errors.txt b/tests/baselines/reference/exportEqualErrorType.errors.txt index 1023e9eff2..4aa1985868 100644 --- a/tests/baselines/reference/exportEqualErrorType.errors.txt +++ b/tests/baselines/reference/exportEqualErrorType.errors.txt @@ -3,7 +3,7 @@ import connect = require('exportEqualErrorType_0'); connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. ~~~~~~ -!!! Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. +!!! error TS2339: Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. ==== tests/cases/compiler/exportEqualErrorType_0.ts (0 errors) ==== module server { diff --git a/tests/baselines/reference/exportEqualMemberMissing.errors.txt b/tests/baselines/reference/exportEqualMemberMissing.errors.txt index da061bc303..ab833c8cc0 100644 --- a/tests/baselines/reference/exportEqualMemberMissing.errors.txt +++ b/tests/baselines/reference/exportEqualMemberMissing.errors.txt @@ -3,7 +3,7 @@ import connect = require('exportEqualMemberMissing_0'); connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. ~~~~~~ -!!! Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. +!!! error TS2339: Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. ==== tests/cases/compiler/exportEqualMemberMissing_0.ts (0 errors) ==== module server { diff --git a/tests/baselines/reference/exportNonVisibleType.errors.txt b/tests/baselines/reference/exportNonVisibleType.errors.txt index 7f615efc61..f498a5ebf5 100644 --- a/tests/baselines/reference/exportNonVisibleType.errors.txt +++ b/tests/baselines/reference/exportNonVisibleType.errors.txt @@ -7,7 +7,7 @@ var x: I1 = {a: "test", b: 42}; export = x; // Should fail, I1 not exported. ~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ==== diff --git a/tests/baselines/reference/exportSameNameFuncVar.errors.txt b/tests/baselines/reference/exportSameNameFuncVar.errors.txt index 44d0c5446b..c616906f73 100644 --- a/tests/baselines/reference/exportSameNameFuncVar.errors.txt +++ b/tests/baselines/reference/exportSameNameFuncVar.errors.txt @@ -2,5 +2,5 @@ export var a = 10; export function a() { ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. } \ No newline at end of file diff --git a/tests/baselines/reference/exportingContainingVisibleType.errors.txt b/tests/baselines/reference/exportingContainingVisibleType.errors.txt index 8649494ddb..545dbec930 100644 --- a/tests/baselines/reference/exportingContainingVisibleType.errors.txt +++ b/tests/baselines/reference/exportingContainingVisibleType.errors.txt @@ -2,7 +2,7 @@ class Foo { public get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var i: Foo; return i; // Should be fine (previous bug report visibility error). diff --git a/tests/baselines/reference/expr.errors.txt b/tests/baselines/reference/expr.errors.txt index 5b233d8a2d..c22f2e9a95 100644 --- a/tests/baselines/reference/expr.errors.txt +++ b/tests/baselines/reference/expr.errors.txt @@ -87,10 +87,10 @@ n==a; n==s; ~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'string'. n==b; ~~~~ -!!! Operator '==' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'number' and 'boolean'. n==i; n==n; n==e; @@ -98,15 +98,15 @@ s==a; s==n; ~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'number'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'number'. s==b; ~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'boolean'. s==i; s==s; s==e; ~~~~ -!!! Operator '==' cannot be applied to types 'string' and 'E'. +!!! error TS2365: Operator '==' cannot be applied to types 'string' and 'E'. a==n; a==s; @@ -125,10 +125,10 @@ e==n; e==s; ~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'string'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'string'. e==b; ~~~~ -!!! Operator '==' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '==' cannot be applied to types 'E' and 'boolean'. e==a; e==i; e==e; @@ -156,10 +156,10 @@ n+s; n+b; ~~~ -!!! Operator '+' cannot be applied to types 'number' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. n+i; ~~~ -!!! Operator '+' cannot be applied to types 'number' and 'I'. +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'I'. n+n; n+e; @@ -179,206 +179,206 @@ i+n; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'number'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'number'. i+s; i+b; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'boolean'. i+a; i+i; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'I'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'I'. i+e; ~~~ -!!! Operator '+' cannot be applied to types 'I' and 'E'. +!!! error TS2365: Operator '+' cannot be applied to types 'I' and 'E'. e+n; e+s; e+b; ~~~ -!!! Operator '+' cannot be applied to types 'E' and 'boolean'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'boolean'. e+a; e+i; ~~~ -!!! Operator '+' cannot be applied to types 'E' and 'I'. +!!! error TS2365: Operator '+' cannot be applied to types 'E' and 'I'. e+e; n^a; n^s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n^b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n^i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n^n; n^e; s^a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s^e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^n; a^s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a^a; a^e; i^n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i^e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^n; e^s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^a; e^i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e^e; n-a; n-s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n-b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n-i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. n-n; n-e; s-a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. s-e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-n; a-s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. a-a; a-e; i-n; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-s; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-b; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-a; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-i; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. i-e; ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-n; e-s; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-b; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-a; e-i; ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. e-e; } \ No newline at end of file diff --git a/tests/baselines/reference/extBaseClass2.errors.txt b/tests/baselines/reference/extBaseClass2.errors.txt index 79e8525a8f..fb6040d472 100644 --- a/tests/baselines/reference/extBaseClass2.errors.txt +++ b/tests/baselines/reference/extBaseClass2.errors.txt @@ -2,14 +2,14 @@ module N { export class C4 extends M.B { ~~~ -!!! Module 'M' has no exported member 'B'. +!!! error TS2305: Module 'M' has no exported member 'B'. } } module M { export class C5 extends B { ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. } } \ No newline at end of file diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt index 7b1fde446f..55867471a2 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.errors.txt @@ -7,20 +7,20 @@ } class D extends C implements C { ~ -!!! Class 'D' incorrectly implements interface 'C': -!!! Types of property 'bar' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'D' incorrectly implements interface 'C': +!!! error TS2421: Types of property 'bar' are incompatible: +!!! error TS2421: Type '() => string' is not assignable to type '() => number': +!!! error TS2421: Type 'string' is not assignable to type 'number'. baz() { } } var d: D = new D(); var r: string = d.foo; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var r2: number = d.foo; var r3: string = d.bar(); var r4: number = d.bar(); ~~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendArray.errors.txt b/tests/baselines/reference/extendArray.errors.txt index d9524acebc..e4b48b53b8 100644 --- a/tests/baselines/reference/extendArray.errors.txt +++ b/tests/baselines/reference/extendArray.errors.txt @@ -7,9 +7,9 @@ interface Array { collect(fn:(e:_element) => _element[]) : any[]; ~~~~~~~~ -!!! Cannot find name '_element'. +!!! error TS2304: Cannot find name '_element'. ~~~~~~~~ -!!! Cannot find name '_element'. +!!! error TS2304: Cannot find name '_element'. } } diff --git a/tests/baselines/reference/extendGenericArray.errors.txt b/tests/baselines/reference/extendGenericArray.errors.txt index 19c93b7edc..74ddd8f1ad 100644 --- a/tests/baselines/reference/extendGenericArray.errors.txt +++ b/tests/baselines/reference/extendGenericArray.errors.txt @@ -6,4 +6,4 @@ var arr: string[] = []; var x: number = arr.foo(); ~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendGenericArray2.errors.txt b/tests/baselines/reference/extendGenericArray2.errors.txt index 23ca38cd7a..27b418fe9c 100644 --- a/tests/baselines/reference/extendGenericArray2.errors.txt +++ b/tests/baselines/reference/extendGenericArray2.errors.txt @@ -8,4 +8,4 @@ var arr: string[] = []; var y: number = arr.x; ~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/extendNonClassSymbol1.errors.txt b/tests/baselines/reference/extendNonClassSymbol1.errors.txt index 730427f529..fec29a7344 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.errors.txt +++ b/tests/baselines/reference/extendNonClassSymbol1.errors.txt @@ -3,4 +3,4 @@ var x = A; class C extends x { } // error, could not find symbol xs ~ -!!! Cannot find name 'x'. \ No newline at end of file +!!! error TS2304: Cannot find name 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/extendNonClassSymbol2.errors.txt b/tests/baselines/reference/extendNonClassSymbol2.errors.txt index 69328a3a71..0e171f1eaf 100644 --- a/tests/baselines/reference/extendNonClassSymbol2.errors.txt +++ b/tests/baselines/reference/extendNonClassSymbol2.errors.txt @@ -5,4 +5,4 @@ var x = new Foo(); // legal, considered a constructor function class C extends Foo {} // error, could not find symbol Foo ~~~ -!!! Cannot find name 'Foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file diff --git a/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt b/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt index 5cabc36a6b..7eeddefb63 100644 --- a/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt +++ b/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts (3 errors) ==== interface InterfaceWithMultipleTypars { // should error ~ -!!! Duplicate identifier 'A'. +!!! error TS2300: Duplicate identifier 'A'. bar(): void; } @@ -11,8 +11,8 @@ interface InterfaceWithSomeTypars { // should error ~~~~~~~~~~~~~~~~~~~~~~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. bar2(): void; } \ No newline at end of file diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt b/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt index f24e3bbc9f..75c4ae2554 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt +++ b/tests/baselines/reference/extendsClauseAlreadySeen.errors.txt @@ -4,12 +4,12 @@ } class D extends C extends C { ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. baz() { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Cannot find name 'baz'. +!!! error TS2304: Cannot find name 'baz'. } \ No newline at end of file diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt b/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt index 9e5c02a425..4aeac08c95 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.errors.txt @@ -4,12 +4,12 @@ } class D extends C extends C { ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~~~~~~~~~~~ ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. baz() { } ~~~~~~~~~~~~~ } ~ -!!! Operator '>' cannot be applied to types 'boolean' and '{ baz: () => void; }'. \ No newline at end of file +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and '{ baz: () => void; }'. \ No newline at end of file diff --git a/tests/baselines/reference/extension.errors.txt b/tests/baselines/reference/extension.errors.txt index 1a5a8f1f01..19bddf9bfe 100644 --- a/tests/baselines/reference/extension.errors.txt +++ b/tests/baselines/reference/extension.errors.txt @@ -16,13 +16,13 @@ declare module M { export extension class C { ~~~~~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~ -!!! Cannot find name 'extension'. +!!! error TS2304: Cannot find name 'extension'. ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. public pe:string; } } @@ -30,7 +30,7 @@ var c=new M.C(); c.pe; ~~ -!!! Property 'pe' does not exist on type 'C'. +!!! error TS2339: Property 'pe' does not exist on type 'C'. c.p; var i:I; i.x; diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 613f6d9f8d..8878c6210b 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -1,24 +1,24 @@ ==== tests/cases/compiler/externModule.ts (13 errors) ==== declare module { ~~~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~ -!!! Cannot find name 'declare'. +!!! error TS2304: Cannot find name 'declare'. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. export class XDate { ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public getDay():number; ~~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. public getXDate():number; ~~~~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. // etc. // Called as a function @@ -34,11 +34,11 @@ constructor(value: number); constructor(); ~~~~~~~~~~~~~~ -!!! Constructor implementation is missing. +!!! error TS2390: Constructor implementation is missing. static parse(string: string): number; ~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. static UTC(year: number, month: number): number; static UTC(year: number, month: number, date: number): number; static UTC(year: number, month: number, date: number, hours: number): number; @@ -46,15 +46,15 @@ static UTC(year: number, month: number, date: number, hours: number, minutes: number, seconds: number): number; static UTC(year: number, month: number, date: number, hours: number, minutes: number, seconds: number, ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ms: number): number; static now(): number; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var d=new XDate(); d.getDay(); diff --git a/tests/baselines/reference/externSemantics.errors.txt b/tests/baselines/reference/externSemantics.errors.txt index 2732c28d1c..30d3308714 100644 --- a/tests/baselines/reference/externSemantics.errors.txt +++ b/tests/baselines/reference/externSemantics.errors.txt @@ -1,9 +1,9 @@ ==== tests/cases/compiler/externSemantics.ts (2 errors) ==== declare var x=10; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. declare var v; declare var y:number=3; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. \ No newline at end of file diff --git a/tests/baselines/reference/externSyntax.errors.txt b/tests/baselines/reference/externSyntax.errors.txt index 791df1b7e0..c2e28b0911 100644 --- a/tests/baselines/reference/externSyntax.errors.txt +++ b/tests/baselines/reference/externSyntax.errors.txt @@ -8,7 +8,7 @@ public f(); public g() { } // error body ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } } diff --git a/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt b/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt index 651f1a2f94..a399273c51 100644 --- a/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt +++ b/tests/baselines/reference/externalModuleExportingGenericClass.errors.txt @@ -2,7 +2,7 @@ import a = require('externalModuleExportingGenericClass_file0'); var v: a; // this should report error ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var v2: any = (new a()).foo; var v3: number = (new a()).foo; diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt index f2dca2d5f4..7e18b10b9d 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.errors.txt @@ -3,7 +3,7 @@ import file1 = require('externalModuleRefernceResolutionOrderInImportDeclaration_file1'); file1.foo(); ~~~ -!!! Property 'foo' does not exist on type 'typeof "externalModuleRefernceResolutionOrderInImportDeclaration_file1"'. +!!! error TS2339: Property 'foo' does not exist on type 'typeof "externalModuleRefernceResolutionOrderInImportDeclaration_file1"'. file1.bar(); diff --git a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt index e10855a94e..b325635b7b 100644 --- a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt +++ b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.errors.txt @@ -3,5 +3,5 @@ // Not on line 0 because we want to verify the error is placed in the appropriate location. export module M { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. } \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt b/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt index 132e369a64..353b766483 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt @@ -1,49 +1,49 @@ ==== tests/cases/compiler/fatarrowfunctionsErrors.ts (18 errors) ==== foo((...Far:any[])=>{return 0;}) ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. foo((1)=>{return 0;}); ~~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. foo((x?)=>{return x;}) ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. foo((x=0)=>{return x;}) ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. var y = x:number => x*x; ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. false? (() => null): null; // missing fatarrow var x1 = () :void {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var x2 = (a:number) :void {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var x3 = (a:number) {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. var x4= (...a: any[]) { }; ~ -!!! '=>' expected. \ No newline at end of file +!!! error TS1005: '=>' expected. \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt index a73ec1dd73..56ab733ab2 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.errors.txt @@ -60,7 +60,7 @@ false ? (arg?: number) => 46 : null; false ? (arg?: number = 0) => 47 : null; ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. false ? (...arg: number[]) => 48 : null; // in ternary exression within paren @@ -72,7 +72,7 @@ false ? ((arg?: number) => 56) : null; false ? ((arg?: number = 0) => 57) : null; ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. false ? ((...arg: number[]) => 58) : null; // ternary exression's else clause @@ -84,7 +84,7 @@ false ? null : (arg?: number) => 66; false ? null : (arg?: number = 0) => 67; ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. false ? null : (...arg: number[]) => 68; @@ -94,9 +94,9 @@ //multiple levels (a?) => { return a; } ? (b)=>(c)=>81 : (c)=>(d)=>82; ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // In Expressions @@ -116,9 +116,9 @@ ((arg:number = 1) => 0) + '' + ((arg:number = 2) => 105); ((arg?:number = 1) => 0) + '' + ((arg?:number = 2) => 106); ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ~~~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. ((...arg:number[]) => 0) + '' + ((...arg:number[]) => 107); ((arg1, arg2?) => 0) + '' + ((arg1,arg2?) => 108); ((arg1, ...arg2:number[]) => 0) + '' + ((arg1, ...arg2:number[]) => 108); @@ -140,11 +140,11 @@ (a = 0) => 117, (a?: number = 0) => 118, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. (...a: number[]) => 119, (a, b? = 0, ...c: number[]) => 120, ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. (a) => (b) => (c) => 121, false? (a) => 0 : (b) => 122 ); \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt index fd103a3dea..98eb71d8ef 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.errors.txt @@ -1,19 +1,19 @@ ==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts (5 errors) ==== (arg1?, arg2) => 101; ~~~~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. (...arg?) => 102; ~~~ -!!! A rest parameter cannot be optional. +!!! error TS1047: A rest parameter cannot be optional. (...arg) => 103; (...arg:number [] = []) => 104; ~~~ -!!! A rest parameter cannot have an initializer. +!!! error TS1048: A rest parameter cannot have an initializer. (...) => 105; ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. // Non optional parameter following an optional one (arg1 = 1, arg2) => 1; ~~~~ -!!! A required parameter cannot follow an optional parameter. \ No newline at end of file +!!! error TS1016: A required parameter cannot follow an optional parameter. \ No newline at end of file diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt index daaa90c3ca..9ab99de109 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt @@ -1,39 +1,39 @@ ==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts (17 errors) ==== var tt1 = (a, (b, c)) => a+b+c; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. var tt2 = ((a), b, c) => a+b+c; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. ~ -!!! Cannot find name 'c'. +!!! error TS2304: Cannot find name 'c'. var tt3 = ((a)) => a; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. ~ -!!! Cannot find name 'a'. \ No newline at end of file +!!! error TS2304: Cannot find name 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt index 40d00c1cff..f6180f440f 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt +++ b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt @@ -3,7 +3,7 @@ x: number; get x(): number { return 1; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/for-inStatements.errors.txt b/tests/baselines/reference/for-inStatements.errors.txt index e90e3dea3d..67b7cbca9b 100644 --- a/tests/baselines/reference/for-inStatements.errors.txt +++ b/tests/baselines/reference/for-inStatements.errors.txt @@ -79,5 +79,5 @@ for (var x in Color) { } for (var x in Color.Blue) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/for-inStatementsInvalid.errors.txt b/tests/baselines/reference/for-inStatementsInvalid.errors.txt index 4b4fff8c51..b32b6def2e 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.errors.txt +++ b/tests/baselines/reference/for-inStatementsInvalid.errors.txt @@ -2,47 +2,47 @@ var aNumber: number; for (aNumber in {}) { } ~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. var aBoolean: boolean; for (aBoolean in {}) { } ~~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. var aRegExp: RegExp; for (aRegExp in {}) { } ~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. for (var idx : number in {}) { } ~~~ -!!! The left-hand side of a 'for...in' statement cannot use a type annotation. +!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. function fn(): void { } for (var x in fn()) { } ~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. var c : string, d:string, e; for (var x in c || d) { } ~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in e ? c : d) { } ~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in 42 ? c : d) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in '' ? c : d) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in 42 ? d[x] : c[x]) { } ~~~~~~~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in c[23]) { } ~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in ((x: T) => x)) { } for (var x in function (x: string, y: number) { return x + y }) { } @@ -51,7 +51,7 @@ biz() : number{ for (var x in this.biz()) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in this.biz) { } for (var x in this) { } return null; @@ -62,7 +62,7 @@ for (var x in this.baz) { } for (var x in this.baz()) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. return null; } @@ -72,14 +72,14 @@ boz() { for (var x in this.biz()) { } ~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. for (var x in this.biz) { } for (var x in this) { } for (var x in super.biz) { } for (var x in super.biz()) { } ~~~~~~~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. return null; } } @@ -92,5 +92,5 @@ for (var x in i[42]) { } ~~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/for.errors.txt b/tests/baselines/reference/for.errors.txt index 8df068271a..3832fdf110 100644 --- a/tests/baselines/reference/for.errors.txt +++ b/tests/baselines/reference/for.errors.txt @@ -29,5 +29,5 @@ for () { // error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/forIn.errors.txt b/tests/baselines/reference/forIn.errors.txt index 51a3b22035..2cf191a26c 100644 --- a/tests/baselines/reference/forIn.errors.txt +++ b/tests/baselines/reference/forIn.errors.txt @@ -2,7 +2,7 @@ var arr = null; for (var i:number in arr) { // error ~ -!!! The left-hand side of a 'for...in' statement cannot use a type annotation. +!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. var x1 = arr[i]; var y1 = arr[i]; } @@ -22,5 +22,5 @@ // error in the body k[l] = 1; ~ -!!! Cannot find name 'k'. +!!! error TS2304: Cannot find name 'k'. } \ No newline at end of file diff --git a/tests/baselines/reference/forIn2.errors.txt b/tests/baselines/reference/forIn2.errors.txt index c1dbfa2da9..3bb71c9f9b 100644 --- a/tests/baselines/reference/forIn2.errors.txt +++ b/tests/baselines/reference/forIn2.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/forIn2.ts (1 errors) ==== for (var i in 1) { ~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/forInStatement2.errors.txt b/tests/baselines/reference/forInStatement2.errors.txt index ef064280a7..7df5129206 100644 --- a/tests/baselines/reference/forInStatement2.errors.txt +++ b/tests/baselines/reference/forInStatement2.errors.txt @@ -2,5 +2,5 @@ var expr: number; for (var a in expr) { ~~~~ -!!! The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. +!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/forInStatement4.errors.txt b/tests/baselines/reference/forInStatement4.errors.txt index b228fb93c8..1cd3904b79 100644 --- a/tests/baselines/reference/forInStatement4.errors.txt +++ b/tests/baselines/reference/forInStatement4.errors.txt @@ -2,5 +2,5 @@ var expr: any; for (var a: number in expr) { ~ -!!! The left-hand side of a 'for...in' statement cannot use a type annotation. +!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/forInStatement7.errors.txt b/tests/baselines/reference/forInStatement7.errors.txt index 432fe82237..1e4d971e11 100644 --- a/tests/baselines/reference/forInStatement7.errors.txt +++ b/tests/baselines/reference/forInStatement7.errors.txt @@ -3,5 +3,5 @@ var expr: any; for (a in expr) { ~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. } \ No newline at end of file diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt b/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt index 17f50e3ff1..c30c5ec93b 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.errors.txt @@ -32,47 +32,47 @@ for( var a: any;;){} for( var a = 1;;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. for( var a = 'a string';;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. for( var a = new C();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. for( var a = new D();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. for( var a = M;;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. for( var b: I;;){} for( var b = new C();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. for( var b = new C2();;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. for(var f = F;;){} for( var f = (x: number) => '';;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. for(var arr: string[];;){} for( var arr = [1, 2, 3, 4];;){} ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. for( var arr = [new C(), new C2(), new D()];;){} ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. for(var arr2 = [new D()];;){} for( var arr2 = new Array>();;){} ~~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. for(var m: typeof M;;){} for( var m = M.A;;){} ~ -!!! Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/forgottenNew.errors.txt b/tests/baselines/reference/forgottenNew.errors.txt index ba44223819..ed0fd202df 100644 --- a/tests/baselines/reference/forgottenNew.errors.txt +++ b/tests/baselines/reference/forgottenNew.errors.txt @@ -5,4 +5,4 @@ var logger = Tools.NullLogger(); ~~~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof NullLogger' is not callable. Did you mean to include 'new'? \ No newline at end of file +!!! error TS2348: Value of type 'typeof NullLogger' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/funClodule.errors.txt b/tests/baselines/reference/funClodule.errors.txt index e4d72d3fc0..b6f694dfd3 100644 --- a/tests/baselines/reference/funClodule.errors.txt +++ b/tests/baselines/reference/funClodule.errors.txt @@ -5,7 +5,7 @@ } declare class foo { } // Should error ~~~ -!!! Duplicate identifier 'foo'. +!!! error TS2300: Duplicate identifier 'foo'. declare class foo2 { } @@ -14,7 +14,7 @@ } declare function foo2(); // Should error ~~~~ -!!! Duplicate identifier 'foo2'. +!!! error TS2300: Duplicate identifier 'foo2'. function foo3() { } @@ -23,4 +23,4 @@ } class foo3 { } // Should error ~~~~ -!!! Duplicate identifier 'foo3'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'foo3'. \ No newline at end of file diff --git a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt index 58936d29db..d088de6f40 100644 --- a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt +++ b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.errors.txt @@ -1,12 +1,12 @@ ==== tests/cases/compiler/functionAndInterfaceWithSeparateErrors.ts (2 errors) ==== function Foo(s: string); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function Foo(n: number) { } interface Foo { [s: string]: string; prop: number; ~~~~~~~~~~~~~ -!!! Property 'prop' of type 'number' is not assignable to string index type 'string'. +!!! error TS2411: Property 'prop' of type 'number' is not assignable to string index type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt index 4eda4b8136..d0c63ac173 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt +++ b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt @@ -3,9 +3,9 @@ public aaaaa() { } public get aaaaa() { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~ -!!! Duplicate identifier 'aaaaa'. +!!! error TS2300: Duplicate identifier 'aaaaa'. return 1; } } \ No newline at end of file diff --git a/tests/baselines/reference/functionArgShadowing.errors.txt b/tests/baselines/reference/functionArgShadowing.errors.txt index f1583f4185..0d061086ad 100644 --- a/tests/baselines/reference/functionArgShadowing.errors.txt +++ b/tests/baselines/reference/functionArgShadowing.errors.txt @@ -4,17 +4,17 @@ function foo(x: A) { var x: B = new B(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'x' must be of type 'A', but here has type 'B'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'A', but here has type 'B'. x.bar(); // the property bar does not exist on a value of type A ~~~ -!!! Property 'bar' does not exist on type 'A'. +!!! error TS2339: Property 'bar' does not exist on type 'A'. } class C { constructor(public p: number) { var p: string; ~ -!!! Subsequent variable declarations must have the same type. Variable 'p' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'number', but here has type 'string'. var n: number = p; } diff --git a/tests/baselines/reference/functionAssignment.errors.txt b/tests/baselines/reference/functionAssignment.errors.txt index 76981e9888..76f5878738 100644 --- a/tests/baselines/reference/functionAssignment.errors.txt +++ b/tests/baselines/reference/functionAssignment.errors.txt @@ -22,7 +22,7 @@ var n = ''; n = 4; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. }); function f3(a: { a: number; b: number; }) { } @@ -36,7 +36,7 @@ callb((a) =>{ a.length; }); ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall10.errors.txt b/tests/baselines/reference/functionCall10.errors.txt index 5ae80cff0e..bfeb902696 100644 --- a/tests/baselines/reference/functionCall10.errors.txt +++ b/tests/baselines/reference/functionCall10.errors.txt @@ -3,9 +3,9 @@ foo(0, 1); foo('foo'); ~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. foo(); foo(1, 'bar'); ~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall11.errors.txt b/tests/baselines/reference/functionCall11.errors.txt index 91593adb4e..c7d1715832 100644 --- a/tests/baselines/reference/functionCall11.errors.txt +++ b/tests/baselines/reference/functionCall11.errors.txt @@ -4,11 +4,11 @@ foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 'bar'); ~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall12.errors.txt b/tests/baselines/reference/functionCall12.errors.txt index 1a89772d74..cda2886aad 100644 --- a/tests/baselines/reference/functionCall12.errors.txt +++ b/tests/baselines/reference/functionCall12.errors.txt @@ -4,12 +4,12 @@ foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 'bar'); foo('foo', 1, 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall13.errors.txt b/tests/baselines/reference/functionCall13.errors.txt index 72a06c77c9..41c8364f49 100644 --- a/tests/baselines/reference/functionCall13.errors.txt +++ b/tests/baselines/reference/functionCall13.errors.txt @@ -4,9 +4,9 @@ foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall14.errors.txt b/tests/baselines/reference/functionCall14.errors.txt index adfd253053..150346dbd3 100644 --- a/tests/baselines/reference/functionCall14.errors.txt +++ b/tests/baselines/reference/functionCall14.errors.txt @@ -5,6 +5,6 @@ foo(); foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall15.errors.txt b/tests/baselines/reference/functionCall15.errors.txt index cb009fc63a..f62615d3e2 100644 --- a/tests/baselines/reference/functionCall15.errors.txt +++ b/tests/baselines/reference/functionCall15.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/functionCall15.ts (1 errors) ==== function foo(a?:string, b?:number, ...b:number[]){} ~ -!!! Duplicate identifier 'b'. \ No newline at end of file +!!! error TS2300: Duplicate identifier 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall16.errors.txt b/tests/baselines/reference/functionCall16.errors.txt index f29d90f56c..6aeadf4a03 100644 --- a/tests/baselines/reference/functionCall16.errors.txt +++ b/tests/baselines/reference/functionCall16.errors.txt @@ -2,14 +2,14 @@ function foo(a:string, b?:string, ...c:number[]){} foo('foo', 1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo'); foo('foo', 'bar'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar', 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall17.errors.txt b/tests/baselines/reference/functionCall17.errors.txt index f6280586cb..ac56f516bd 100644 --- a/tests/baselines/reference/functionCall17.errors.txt +++ b/tests/baselines/reference/functionCall17.errors.txt @@ -2,16 +2,16 @@ function foo(a:string, b?:string, c?:number, ...d:number[]){} foo('foo', 1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo'); foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar', 3, 4); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall6.errors.txt b/tests/baselines/reference/functionCall6.errors.txt index c871e15d30..94e2f26c12 100644 --- a/tests/baselines/reference/functionCall6.errors.txt +++ b/tests/baselines/reference/functionCall6.errors.txt @@ -3,11 +3,11 @@ foo('bar'); foo(2); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar'); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall7.errors.txt b/tests/baselines/reference/functionCall7.errors.txt index d41add08dd..546ca999d0 100644 --- a/tests/baselines/reference/functionCall7.errors.txt +++ b/tests/baselines/reference/functionCall7.errors.txt @@ -5,11 +5,11 @@ foo(myC); foo(myC, myC); ~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'c1'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'c1'. foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall8.errors.txt b/tests/baselines/reference/functionCall8.errors.txt index 85eee80472..e067a9d829 100644 --- a/tests/baselines/reference/functionCall8.errors.txt +++ b/tests/baselines/reference/functionCall8.errors.txt @@ -3,9 +3,9 @@ foo('foo'); foo('foo', 'bar'); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(4); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. foo(); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall9.errors.txt b/tests/baselines/reference/functionCall9.errors.txt index 5feb59f77c..abc386cb2c 100644 --- a/tests/baselines/reference/functionCall9.errors.txt +++ b/tests/baselines/reference/functionCall9.errors.txt @@ -4,8 +4,8 @@ foo('foo'); foo('foo','bar'); ~~~~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. foo('foo', 1, 'bar'); ~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(); \ No newline at end of file diff --git a/tests/baselines/reference/functionCalls.errors.txt b/tests/baselines/reference/functionCalls.errors.txt index 3aa587c70a..c29dc5736e 100644 --- a/tests/baselines/reference/functionCalls.errors.txt +++ b/tests/baselines/reference/functionCalls.errors.txt @@ -9,13 +9,13 @@ // These should be errors anyVar('hello'); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. anyVar(); ~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. anyVar(undefined); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. // Invoke function call on value of a subtype of Function with no call signatures with no type arguments @@ -32,24 +32,24 @@ // These should be errors subFunc(0); ~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. subFunc(''); ~~~~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. subFunc(); ~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. // Invoke function call on value of type Function with no call signatures with type arguments // These should be errors var func: Function; func(0); ~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. func(''); ~~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. func(); ~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt index 3fb2b84fed..cdbf00c5a6 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt +++ b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt @@ -5,13 +5,13 @@ foo(1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Function'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Function'. foo(() => { }, 1); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. foo(1, () => { }); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. function foo2 string>(x: T): T { return x; } @@ -29,41 +29,41 @@ var r = foo2(new Function()); ~~~~~~~~~~~~~~ -!!! Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. var r2 = foo2((x: string[]) => x); ~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. var r6 = foo2(C); ~ -!!! Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. var r7 = foo2(b); ~ -!!! Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. var r8 = foo2((x: U) => x); // no error expected var r11 = foo2((x: U, y: V) => x); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. var r13 = foo2(C2); ~~ -!!! Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. var r14 = foo2(b2); ~~ -!!! Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. interface F2 extends Function { foo: string; } var f2: F2; var r16 = foo2(f2); ~~ -!!! Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. function fff(x: T, y: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo2(x); ~ -!!! Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. foo2(y); ~ -!!! Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. +!!! error TS2345: Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionExpressionInWithBlock.errors.txt b/tests/baselines/reference/functionExpressionInWithBlock.errors.txt index 6a0947e95b..3176ba8306 100644 --- a/tests/baselines/reference/functionExpressionInWithBlock.errors.txt +++ b/tests/baselines/reference/functionExpressionInWithBlock.errors.txt @@ -2,7 +2,7 @@ function x() { with({}) { ~~ -!!! All symbols within a 'with' block will be resolved to 'any'. +!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'. function f() { () => this; } diff --git a/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt b/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt index e8f34d5d55..322f796299 100644 --- a/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt +++ b/tests/baselines/reference/functionExpressionShadowedByParams.errors.txt @@ -3,7 +3,7 @@ b1.toPrecision(2); // should not error b1(12); // should error ~~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } @@ -12,7 +12,7 @@ b.toPrecision(2); // should not error b.apply(null, null); // should error ~~~~~ -!!! Property 'apply' does not exist on type 'number'. +!!! error TS2339: Property 'apply' does not exist on type 'number'. } }; \ No newline at end of file diff --git a/tests/baselines/reference/functionImplementationErrors.errors.txt b/tests/baselines/reference/functionImplementationErrors.errors.txt index 5c2d678840..855a8a3a5c 100644 --- a/tests/baselines/reference/functionImplementationErrors.errors.txt +++ b/tests/baselines/reference/functionImplementationErrors.errors.txt @@ -8,7 +8,7 @@ ~~~~~~~~~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. var f2 = function x() { ~~~~~~~~~~~~~~ return ''; @@ -17,7 +17,7 @@ ~~~~~~~~~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. var f3 = () => { ~~~~~~~ return ''; @@ -26,7 +26,7 @@ ~~~~~~~~~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. // FunctionExpression with no return type annotation with return branch of number[] and other of string[] var f4 = function () { @@ -43,33 +43,33 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. // Function implemetnation with non -void return type annotation with no return function f5(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. } var m; // Function signature with parameter initializer referencing in scope local variable function f6(n = m) { ~ -!!! Initializer of parameter 'n' cannot reference identifier 'm' declared after it. +!!! error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. var m = 4; } // Function signature with initializer referencing other parameter to the right function f7(n = m, m?) { ~ -!!! Initializer of parameter 'n' cannot reference identifier 'm' declared after it. +!!! error TS2373: Initializer of parameter 'n' cannot reference identifier 'm' declared after it. } // FunctionExpression with non -void return type annotation with a throw, no return, and other code // Should be error but isn't undefined === function (): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. throw undefined; var x = 4; }; diff --git a/tests/baselines/reference/functionNameConflicts.errors.txt b/tests/baselines/reference/functionNameConflicts.errors.txt index 0442a51324..0ddee01d68 100644 --- a/tests/baselines/reference/functionNameConflicts.errors.txt +++ b/tests/baselines/reference/functionNameConflicts.errors.txt @@ -6,35 +6,35 @@ function fn1() { } var fn1; ~~~ -!!! Duplicate identifier 'fn1'. +!!! error TS2300: Duplicate identifier 'fn1'. var fn2; function fn2() { } ~~~ -!!! Duplicate identifier 'fn2'. +!!! error TS2300: Duplicate identifier 'fn2'. } function fn3() { } var fn3; ~~~ -!!! Duplicate identifier 'fn3'. +!!! error TS2300: Duplicate identifier 'fn3'. function func() { var fn4; function fn4() { } ~~~ -!!! Duplicate identifier 'fn4'. +!!! error TS2300: Duplicate identifier 'fn4'. function fn5() { } var fn5; ~~~ -!!! Duplicate identifier 'fn5'. +!!! error TS2300: Duplicate identifier 'fn5'. } function over(); function overrr() { ~~~~~~ -!!! Function implementation name must be 'over'. +!!! error TS2389: Function implementation name must be 'over'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt b/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt index 7c9eb9482d..1fdd8c9e1b 100644 --- a/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt +++ b/tests/baselines/reference/functionOverloadAmbiguity1.errors.txt @@ -4,7 +4,7 @@ function callb(a) { } callb((a) => { a.length; } ); // error, chose first overload ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. function callb2(lam: (n: string) => void ); function callb2(lam: (l: number) => void ); diff --git a/tests/baselines/reference/functionOverloadErrors.errors.txt b/tests/baselines/reference/functionOverloadErrors.errors.txt index c2fcff7a94..0275c54ca5 100644 --- a/tests/baselines/reference/functionOverloadErrors.errors.txt +++ b/tests/baselines/reference/functionOverloadErrors.errors.txt @@ -2,7 +2,7 @@ //Function overload signature with initializer function fn1(x = 3); ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function fn1() { } //Multiple function overload signatures that are identical @@ -46,7 +46,7 @@ //Function overloads that differ only by type parameter constraints function fn10(); ~~~~~~ -!!! Cannot find name 'Window'. +!!! error TS2304: Cannot find name 'Window'. function fn10(); function fn10() { } // (actually OK) @@ -54,10 +54,10 @@ //Function overloads that differ only by type parameter constraints where constraints are structually identical function fn11(); ~~~~~~ -!!! Cannot find name 'Window'. +!!! error TS2304: Cannot find name 'Window'. function fn11(); ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. function fn11() { } //Function overloads that differ only by type parameter constraints where constraints include infinitely recursive type reference @@ -73,12 +73,12 @@ public f(); private f(s: string); ~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. f() { } private g(s: string); ~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. public g(); g() { } } @@ -87,13 +87,13 @@ module M { export function fn1(); ~~~ -!!! Overload signatures must all be exported or not exported. +!!! error TS2383: Overload signatures must all be exported or not exported. function fn1(n: string); function fn1() { } function fn2(n: string); ~~~ -!!! Overload signatures must all be exported or not exported. +!!! error TS2383: Overload signatures must all be exported or not exported. export function fn2(); export function fn2() { } } @@ -101,33 +101,33 @@ //Function overloads with differing ambience declare function dfn1(); ~~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function dfn1(s: string); function dfn1() { } function dfn2(); declare function dfn2(s: string); ~~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. function dfn2() { } //Function overloads with fewer params than implementation signature function fewerParams(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function fewerParams(n: string) { } //Function implementation whose parameter types are not assignable to all corresponding overload signature parameters function fn13(n: string); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function fn13(n: number) { } //Function overloads where return types are not all subtype of implementation return type function fn14(n: string): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function fn14() { return 3; } @@ -142,6 +142,6 @@ //Function overloads which use initializer expressions function initExpr(n = 13); ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. function initExpr() { } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt b/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt index 81f7a63b96..77b6a7a5a7 100644 --- a/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt +++ b/tests/baselines/reference/functionOverloadErrorsSyntax.errors.txt @@ -2,17 +2,17 @@ //Function overload signature with optional parameter followed by non-optional parameter function fn4a(x?: number, y: string); ~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. function fn4a() { } function fn4b(n: string, x?: number, y: string); ~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. function fn4b() { } //Function overload signature with rest param followed by non-optional parameter function fn5(x: string, ...y: any[], z: string); ~ -!!! A rest parameter must be last in a parameter list. +!!! error TS1014: A rest parameter must be last in a parameter list. function fn5() { } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt b/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt index 427595d1e0..2feb7da1b5 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName.errors.txt @@ -3,4 +3,4 @@ function foo(x, y); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. \ No newline at end of file +!!! error TS2389: Function implementation name must be 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt index c656065b37..205d1888b6 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.errors.txt @@ -2,7 +2,7 @@ function foo(x); function bar() { } ~~~ -!!! Function implementation name must be 'foo'. +!!! error TS2389: Function implementation name must be 'foo'. function foo(x, y); ~~~ -!!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file +!!! error TS2391: Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads.errors.txt b/tests/baselines/reference/functionOverloads.errors.txt index 1b2e20e5a8..e68e00f6b2 100644 --- a/tests/baselines/reference/functionOverloads.errors.txt +++ b/tests/baselines/reference/functionOverloads.errors.txt @@ -4,4 +4,4 @@ function foo(bar?: string): any { return "" }; var x = foo(5); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads1.errors.txt b/tests/baselines/reference/functionOverloads1.errors.txt index 610363c772..646ba6ccad 100644 --- a/tests/baselines/reference/functionOverloads1.errors.txt +++ b/tests/baselines/reference/functionOverloads1.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/functionOverloads1.ts (1 errors) ==== function foo(); ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. 1+1; function foo():string { return "a" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads11.errors.txt b/tests/baselines/reference/functionOverloads11.errors.txt index a3a8393ec7..b4819b55b7 100644 --- a/tests/baselines/reference/functionOverloads11.errors.txt +++ b/tests/baselines/reference/functionOverloads11.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/functionOverloads11.ts (1 errors) ==== function foo():number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads17.errors.txt b/tests/baselines/reference/functionOverloads17.errors.txt index 434cacaeac..5b5a76d875 100644 --- a/tests/baselines/reference/functionOverloads17.errors.txt +++ b/tests/baselines/reference/functionOverloads17.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/functionOverloads17.ts (1 errors) ==== function foo():{a:number;} ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():{a:string;} { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads18.errors.txt b/tests/baselines/reference/functionOverloads18.errors.txt index 9db680de2e..0fe1b64778 100644 --- a/tests/baselines/reference/functionOverloads18.errors.txt +++ b/tests/baselines/reference/functionOverloads18.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/functionOverloads18.ts (1 errors) ==== function foo(bar:{a:number;}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}) { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads19.errors.txt b/tests/baselines/reference/functionOverloads19.errors.txt index 807a3383c8..ee195012da 100644 --- a/tests/baselines/reference/functionOverloads19.errors.txt +++ b/tests/baselines/reference/functionOverloads19.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/functionOverloads19.ts (1 errors) ==== function foo(bar:{b:string;}); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}); function foo(bar:{a:any;}) { return {a:""} } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads2.errors.txt b/tests/baselines/reference/functionOverloads2.errors.txt index c0023ab9dc..fe62e8d8be 100644 --- a/tests/baselines/reference/functionOverloads2.errors.txt +++ b/tests/baselines/reference/functionOverloads2.errors.txt @@ -4,4 +4,4 @@ function foo(bar: any): any { return bar }; var x = foo(true); ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. \ No newline at end of file +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads20.errors.txt b/tests/baselines/reference/functionOverloads20.errors.txt index 106dde569a..0ab4789eff 100644 --- a/tests/baselines/reference/functionOverloads20.errors.txt +++ b/tests/baselines/reference/functionOverloads20.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/functionOverloads20.ts (1 errors) ==== function foo(bar:{a:number;}): number; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:{a:string;}): string; function foo(bar:{a:any;}): string {return ""} \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads22.errors.txt b/tests/baselines/reference/functionOverloads22.errors.txt index e091094f01..aeb6f758d0 100644 --- a/tests/baselines/reference/functionOverloads22.errors.txt +++ b/tests/baselines/reference/functionOverloads22.errors.txt @@ -2,6 +2,6 @@ function foo(bar:number):{a:number;}[]; function foo(bar:string):{a:number; b:string;}[]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(bar:any):{a:any;b?:any;}[] { return [{a:""}] } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads27.errors.txt b/tests/baselines/reference/functionOverloads27.errors.txt index 35216e2fe4..d671872b62 100644 --- a/tests/baselines/reference/functionOverloads27.errors.txt +++ b/tests/baselines/reference/functionOverloads27.errors.txt @@ -4,5 +4,5 @@ function foo(bar?:any):any{ return '' } var x = foo(5); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads29.errors.txt b/tests/baselines/reference/functionOverloads29.errors.txt index 510d9c4575..44656918ae 100644 --- a/tests/baselines/reference/functionOverloads29.errors.txt +++ b/tests/baselines/reference/functionOverloads29.errors.txt @@ -4,5 +4,5 @@ function foo(bar:any):any{ return bar } var x = foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads3.errors.txt b/tests/baselines/reference/functionOverloads3.errors.txt index b153d81c10..5c98a79192 100644 --- a/tests/baselines/reference/functionOverloads3.errors.txt +++ b/tests/baselines/reference/functionOverloads3.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/functionOverloads3.ts (1 errors) ==== function foo():string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. \ No newline at end of file +!!! error TS2391: Function implementation is missing or not immediately following the declaration. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads34.errors.txt b/tests/baselines/reference/functionOverloads34.errors.txt index 6dc7b45c3d..7fda1b44ea 100644 --- a/tests/baselines/reference/functionOverloads34.errors.txt +++ b/tests/baselines/reference/functionOverloads34.errors.txt @@ -4,5 +4,5 @@ function foo(bar:{a:any;}):any{ return bar } var x = foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads37.errors.txt b/tests/baselines/reference/functionOverloads37.errors.txt index 0e93e7a459..12d9dcbde6 100644 --- a/tests/baselines/reference/functionOverloads37.errors.txt +++ b/tests/baselines/reference/functionOverloads37.errors.txt @@ -4,5 +4,5 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo(); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads4.errors.txt b/tests/baselines/reference/functionOverloads4.errors.txt index 3ec1a19dd3..2892c5bcaf 100644 --- a/tests/baselines/reference/functionOverloads4.errors.txt +++ b/tests/baselines/reference/functionOverloads4.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/functionOverloads4.ts (1 errors) ==== function foo():number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "a" } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads40.errors.txt b/tests/baselines/reference/functionOverloads40.errors.txt index 94e9ccc9ab..e2d0d0ee7b 100644 --- a/tests/baselines/reference/functionOverloads40.errors.txt +++ b/tests/baselines/reference/functionOverloads40.errors.txt @@ -4,8 +4,8 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:'bar'}]); ~~~~~~~~~~~ -!!! Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! Type '{ a: string; }' is not assignable to type '{ a: boolean; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. +!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }': +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads41.errors.txt b/tests/baselines/reference/functionOverloads41.errors.txt index 5d84364f8d..82944f3d3f 100644 --- a/tests/baselines/reference/functionOverloads41.errors.txt +++ b/tests/baselines/reference/functionOverloads41.errors.txt @@ -4,7 +4,7 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{}]); ~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! Type '{}' is not assignable to type '{ a: boolean; }': -!!! Property 'a' is missing in type '{}'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. +!!! error TS2345: Type '{}' is not assignable to type '{ a: boolean; }': +!!! error TS2345: Property 'a' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads5.errors.txt b/tests/baselines/reference/functionOverloads5.errors.txt index a73fb152a0..b7ff2c4505 100644 --- a/tests/baselines/reference/functionOverloads5.errors.txt +++ b/tests/baselines/reference/functionOverloads5.errors.txt @@ -2,7 +2,7 @@ class baz { public foo(); ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(bar?:any){ } } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt b/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt index c5cfcb2ac7..f286423905 100644 --- a/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt +++ b/tests/baselines/reference/functionOverloadsOutOfOrder.errors.txt @@ -6,7 +6,7 @@ } private foo(s: string): string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class e { @@ -16,5 +16,5 @@ private foo(s: string): string; private foo(n: number): string; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt index 7d7a66e42b..684676dbd7 100644 --- a/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/functionSignatureAssignmentCompat1.errors.txt @@ -10,7 +10,7 @@ var c: ParserFunc = parsers.raw; // ok! var d: ParserFunc = parsers.readline; // not ok ~ -!!! Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc': -!!! Types of parameters 'delimiter' and 'eventEmitter' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(delimiter?: string) => ParserFunc' is not assignable to type 'ParserFunc': +!!! error TS2322: Types of parameters 'delimiter' and 'eventEmitter' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var e: ParserFunc = parsers.readline(); // ok \ No newline at end of file diff --git a/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt b/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt index d6c2262660..ecc9050ca0 100644 --- a/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt +++ b/tests/baselines/reference/functionTypeArgumentArrayAssignment.errors.txt @@ -3,7 +3,7 @@ foo: T; length: number; ~~~~~~ -!!! Duplicate identifier 'length'. +!!! error TS2300: Duplicate identifier 'length'. } function map() { diff --git a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt index a7c07b9de7..a440f0d176 100644 --- a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt +++ b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.errors.txt @@ -12,5 +12,5 @@ console.log(s); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. \ No newline at end of file diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt index d599e2da44..8c57547950 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt +++ b/tests/baselines/reference/functionWithMultipleReturnStatements.errors.txt @@ -16,7 +16,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f2() { ~~~~~~~~~~~~~~~ @@ -36,7 +36,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f3() { ~~~~~~~~~~~~~~~ @@ -54,7 +54,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f4() { ~~~~~~~~~~~~~~~ @@ -78,7 +78,7 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f5() { ~~~~~~~~~~~~~~~ @@ -88,7 +88,7 @@ ~~~~~~~~~~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f6(x: T, y:U) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -104,14 +104,14 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. function f8(x: T, y: U) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. if (true) { ~~~~~~~~~~~~~~~ return x; @@ -124,5 +124,5 @@ ~~~~~ } ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. \ No newline at end of file diff --git a/tests/baselines/reference/functionWithSameNameAsField.errors.txt b/tests/baselines/reference/functionWithSameNameAsField.errors.txt index ce69b7feb5..759b60d37a 100644 --- a/tests/baselines/reference/functionWithSameNameAsField.errors.txt +++ b/tests/baselines/reference/functionWithSameNameAsField.errors.txt @@ -3,7 +3,7 @@ public total: number; public total(total: number) { ~~~~~ -!!! Duplicate identifier 'total'. +!!! error TS2300: Duplicate identifier 'total'. this.total = total; return this; } diff --git a/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt b/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt index b354a9f885..9b32cc406f 100644 --- a/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt +++ b/tests/baselines/reference/functionWithThrowButNoReturn1.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/functionWithThrowButNoReturn1.ts (1 errors) ==== function fn(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. throw new Error('NYI'); var t; } diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt index 6ddbc91db5..6a6cdd1ddd 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.errors.txt @@ -2,7 +2,7 @@ function f1(): string { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. // errors because there are no return statements } @@ -66,7 +66,7 @@ function f14(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. // Not fine, since we can *only* consist of a single throw statement // if no return statements are present but we are annotated. throw undefined; @@ -98,7 +98,7 @@ class C { public get m1() { ~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. // Errors; get accessors must return a value. } @@ -118,12 +118,12 @@ public get m5() { ~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. // Not fine, since we can *only* consist of a single throw statement // if no return statements are present but we are a get accessor. throw null; throw undefined. } ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. } \ No newline at end of file diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt index 2d70aed4a3..eb57a2fe70 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt @@ -4,7 +4,7 @@ ==== tests/cases/compiler/funduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! A module declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A module declaration cannot be in a different file from a class or function with which it is merged export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/fuzzy.errors.txt b/tests/baselines/reference/fuzzy.errors.txt index 36124da5ce..f0bae2f45c 100644 --- a/tests/baselines/reference/fuzzy.errors.txt +++ b/tests/baselines/reference/fuzzy.errors.txt @@ -13,8 +13,8 @@ export class C implements I { ~ -!!! Class 'C' incorrectly implements interface 'I': -!!! Property 'alsoWorks' is missing in type 'C'. +!!! error TS2421: Class 'C' incorrectly implements interface 'I': +!!! error TS2421: Property 'alsoWorks' is missing in type 'C'. constructor(public x:number) { } works():R { @@ -24,16 +24,16 @@ doesntWork():R { return { anything:1, oneI:this }; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type '{ anything: number; oneI: C; }' is not assignable to type 'R': -!!! Types of property 'oneI' are incompatible: -!!! Type 'C' is not assignable to type 'I'. +!!! error TS2322: Type '{ anything: number; oneI: C; }' is not assignable to type 'R': +!!! error TS2322: Types of property 'oneI' are incompatible: +!!! error TS2322: Type 'C' is not assignable to type 'I'. } worksToo():R { return ({ oneI: this }); ~~~~~~~~~~~~~~~~~~~ -!!! Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: -!!! Property 'anything' is missing in type '{ oneI: C; }'. +!!! error TS2353: Neither type '{ oneI: C; }' nor type 'R' is assignable to the other: +!!! error TS2353: Property 'anything' is missing in type '{ oneI: C; }'. } } } diff --git a/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt b/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt index d07bbe81e1..034b044771 100644 --- a/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt +++ b/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt @@ -7,7 +7,7 @@ interface A { // error ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. bar: T; } @@ -18,7 +18,7 @@ interface A { // error ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. foo: string; } } @@ -44,7 +44,7 @@ module M3 { export interface A { // error ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. bar: T; } } \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayAssignment1.errors.txt b/tests/baselines/reference/genericArrayAssignment1.errors.txt index 1b8d6cb2aa..a2b07b39d7 100644 --- a/tests/baselines/reference/genericArrayAssignment1.errors.txt +++ b/tests/baselines/reference/genericArrayAssignment1.errors.txt @@ -4,5 +4,5 @@ s = n; ~ -!!! Type 'number[]' is not assignable to type 'string[]': -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'number[]' is not assignable to type 'string[]': +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt b/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt index e57112cf0f..65f03ce109 100644 --- a/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt +++ b/tests/baselines/reference/genericArrayAssignmentCompatErrors.errors.txt @@ -2,11 +2,11 @@ var myCars=new Array(); var myCars2 = new []; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var myCars3 = new Array({}); var myCars4: Array; // error ~~~~~ -!!! Generic type 'Array' requires 1 type argument(s). +!!! error TS2314: Generic type 'Array' requires 1 type argument(s). var myCars5: Array[]; myCars = myCars2; diff --git a/tests/baselines/reference/genericArrayExtenstions.errors.txt b/tests/baselines/reference/genericArrayExtenstions.errors.txt index c13b637a39..2e749d84a4 100644 --- a/tests/baselines/reference/genericArrayExtenstions.errors.txt +++ b/tests/baselines/reference/genericArrayExtenstions.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/genericArrayExtenstions.ts (2 errors) ==== export declare class ObservableArray implements Array { // MS.Entertainment.ObservableArray ~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~~~~~ -!!! Class 'ObservableArray' incorrectly implements interface 'T[]': -!!! Property 'length' is missing in type 'ObservableArray'. +!!! error TS2421: Class 'ObservableArray' incorrectly implements interface 'T[]': +!!! error TS2421: Property 'length' is missing in type 'ObservableArray'. concat(...items: U[]): T[]; concat(...items: T[]): T[]; } diff --git a/tests/baselines/reference/genericArrayMethods1.errors.txt b/tests/baselines/reference/genericArrayMethods1.errors.txt index 669fa926c2..26db054003 100644 --- a/tests/baselines/reference/genericArrayMethods1.errors.txt +++ b/tests/baselines/reference/genericArrayMethods1.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/genericArrayMethods1.ts (1 errors) ==== var x:string[] = [0,1].slice(0); // this should be an error ~ -!!! Type 'number[]' is not assignable to type 'string[]': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'number[]' is not assignable to type 'string[]': +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt b/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt index 7cec6a532a..9007b01191 100644 --- a/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt +++ b/tests/baselines/reference/genericArrayWithoutTypeAnnotation.errors.txt @@ -4,7 +4,7 @@ class Bar { public getBar(foo: IFoo[]) { ~~~~ -!!! Generic type 'IFoo' requires 1 type argument(s). +!!! error TS2314: Generic type 'IFoo' requires 1 type argument(s). } } \ No newline at end of file diff --git a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt index ad664c5c5b..8a5dc26a6b 100644 --- a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/genericAssignmentCompatOfFunctionSignatures1.ts (2 errors) ==== var x1 = function foo3(x: T, z: U) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var x2 = function foo3(x: T, z: U) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. x1 = x2; x2 = x1; \ No newline at end of file diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt index 8bd0c91312..61cdd97a75 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.errors.txt @@ -12,41 +12,41 @@ var z = { x: new A() }; var a1: I = { x: new A() }; ~~ -!!! Type '{ x: A; }' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var a2: I = function (): { x: A } { ~~ -!!! Type '{ x: A; }' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var z = { x: new A() }; return z; } (); var a3: I = z; ~~ -!!! Type '{ x: A; }' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ x: A; }' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. var a4: I = >z; ~~ -!!! Type 'K' is not assignable to type 'I': -!!! Types of property 'x' are incompatible: -!!! Type 'A' is not assignable to type 'Comparable': -!!! Types of property 'compareTo' are incompatible: -!!! Type '(other: number) => number' is not assignable to type '(other: string) => number': -!!! Types of parameters 'other' and 'other' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'K' is not assignable to type 'I': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'Comparable': +!!! error TS2322: Types of property 'compareTo' are incompatible: +!!! error TS2322: Type '(other: number) => number' is not assignable to type '(other: string) => number': +!!! error TS2322: Types of parameters 'other' and 'other' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt b/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt index 40d523e01e..912ea4fdb4 100644 --- a/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt +++ b/tests/baselines/reference/genericCallSpecializedToTypeArg.errors.txt @@ -6,7 +6,7 @@ var y = dupe(x); //<-- dupe has incorrect type here y.getDist(); //<-- this requires a missing constraint, but it's not caught ~~~~~~~ -!!! Property 'getDist' does not exist on type 'U'. +!!! error TS2339: Property 'getDist' does not exist on type 'U'. return y; } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt index 6d829215cd..a232ea9bf5 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt @@ -3,7 +3,7 @@ function foo(t: T) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var u: U; return u; } @@ -13,5 +13,5 @@ var r3 = foo(new Object()); // {} var r4 = foo(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Date'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Date'. var r5 = foo(new Date()); // no error \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt index c92110911a..841cfa10f6 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt @@ -11,11 +11,11 @@ var arg2: { cb: new (x: T, y: T) => string }; var r2 = foo(arg2); // error ~~~~ -!!! Argument of type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'. +!!! error TS2345: Argument of type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'. var arg3: { cb: new (x: string, y: number) => string }; var r3 = foo(arg3); // error ~~~~ -!!! Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'. +!!! error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'. function foo2(arg: { cb: new(t: T, t2: T) => U }) { return new arg.cb(null, null); diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt index 8de5453e2a..8891d487a0 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt @@ -10,14 +10,14 @@ // more args not allowed var r2 = foo({ cb: (x: T, y: T) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. -!!! Types of property 'cb' are incompatible: -!!! Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. +!!! error TS2345: Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: {}) => string; }'. +!!! error TS2345: Types of property 'cb' are incompatible: +!!! error TS2345: Type '(x: T, y: T) => string' is not assignable to type '(t: {}) => string'. var r3 = foo({ cb: (x: string, y: number) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. -!!! Types of property 'cb' are incompatible: -!!! Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. +!!! error TS2345: Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. +!!! error TS2345: Types of property 'cb' are incompatible: +!!! error TS2345: Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. function foo2(arg: { cb: (t: T, t2: T) => U }) { return arg.cb(null, null); diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt index 9396e3f2de..fefa6afddc 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt @@ -14,10 +14,10 @@ // BUG 835518 var r9 = r7(new Date()); // should be ok ~~~~~~~~~~ -!!! Argument of type 'Date' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. var r10 = r7(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. } function foo2(a: (x: T) => T, b: (x: T) => T) { @@ -28,7 +28,7 @@ function other3(x: T) { var r7 = foo2((a: T) => a, (b: T) => b); // error ~~~~~~~~~~~ -!!! Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. +!!! error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. var r7b = foo2((a) => a, (b) => b); // valid, T is inferred to be Date } @@ -42,4 +42,4 @@ var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error ~~~~~~~~~~ -!!! Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'. \ No newline at end of file +!!! error TS2345: Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt index 9551a712b7..664539e97a 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt @@ -4,21 +4,21 @@ // these are all errors var x2 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. -!!! Types of property 'y' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. +!!! error TS2345: Types of property 'y' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'number'. var x3 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. -!!! Types of property 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. +!!! error TS2345: Types of property 'x' are incompatible: +!!! error TS2345: Type 'number' is not assignable to type 'string'. var x4 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. +!!! error TS2345: Types of property 'x' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'number'. var x5 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ -!!! Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. -!!! Types of property 'y' are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. +!!! error TS2345: Types of property 'y' are incompatible: +!!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt index 6ac5e2234e..39a20d1f41 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt @@ -20,7 +20,7 @@ function f2(a: U) { ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var r: T; return r; } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt index 4d306264e7..4dc0ab7eb0 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt @@ -12,7 +12,7 @@ function foo(t: T, t2: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return (x: T) => t2; } @@ -30,11 +30,11 @@ function other() { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var r4 = foo(c, d); var r5 = foo(c, d); // error ~ -!!! Argument of type 'C' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt index 1b619f5ce7..9bfa3894e3 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt @@ -12,7 +12,7 @@ function foo(t: T, t2: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return (x: T) => t2; } @@ -23,9 +23,9 @@ function other() { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var r5 = foo(c, d); // error ~ -!!! Argument of type 'C' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'C' is not assignable to parameter of type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt index 3df159e7ce..3231126eb6 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexersErrors.errors.txt @@ -15,17 +15,17 @@ function other3(arg: T) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b: { [x: string]: Object; [x: number]: T; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'T' is not assignable to string index type 'Object'. +!!! error TS2413: Numeric index type 'T' is not assignable to string index type 'Object'. }; var r2 = foo(b); var d = r2[1]; var e = r2['1']; var u: U = r2[1]; // ok ~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt index 880e0895c3..6a06d68aea 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt @@ -5,28 +5,28 @@ function foo2(x: T = undefined) { return x; } // ok function foo3(x: T = 1) { } // error ~~~~~~~~ -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2323: Type 'number' is not assignable to type 'T'. function foo4(x: T, y: U = x) { } // error ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. function foo5(x: U, y: T = x) { } // ok ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. function foo6(x: T, y: U, z: V = y) { } // error ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'U' is not assignable to type 'V'. +!!! error TS2323: Type 'U' is not assignable to type 'V'. function foo7(x: V, y: U = x) { } // should be ok ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~ -!!! Type 'V' is not assignable to type 'U'. \ No newline at end of file +!!! error TS2323: Type 'V' is not assignable to type 'U'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt index 04756285ab..c2a4b332b4 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt @@ -31,7 +31,7 @@ var b: { new (x: T, y: T): string }; var r10 = foo6(b); // error ~ -!!! Argument of type 'new (x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'. +!!! error TS2345: Argument of type 'new (x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'. function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt index 7028f0cf38..dfd4e47d62 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt @@ -28,7 +28,7 @@ var r10 = foo6((x: T, y: T) => ''); // error ~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'. +!!! error TS2345: Argument of type '(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'. function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallWithoutArgs.errors.txt b/tests/baselines/reference/genericCallWithoutArgs.errors.txt index 5756cc000d..f7ff03fb61 100644 --- a/tests/baselines/reference/genericCallWithoutArgs.errors.txt +++ b/tests/baselines/reference/genericCallWithoutArgs.errors.txt @@ -4,10 +4,10 @@ f. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. ~~~~~~ -!!! Cannot find name 'string'. \ No newline at end of file +!!! error TS2304: Cannot find name 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt index ca5fd61642..9672f7492c 100644 --- a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt +++ b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt @@ -2,32 +2,32 @@ function foo(x:T, y:U, f: (v: T) => U) { var r1 = f(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r2 = f(1); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. var r3 = f(null); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r4 = f(null); var r11 = f(x); var r21 = f(x); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r31 = f(null); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r41 = f(null); var r12 = f(y); ~ -!!! Argument of type 'U' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'U' is not assignable to parameter of type 'T'. var r22 = f(y); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r32 = f(null); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r42 = f(null); } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallsWithoutParens.errors.txt b/tests/baselines/reference/genericCallsWithoutParens.errors.txt index bfce0d2bf2..0187ceade8 100644 --- a/tests/baselines/reference/genericCallsWithoutParens.errors.txt +++ b/tests/baselines/reference/genericCallsWithoutParens.errors.txt @@ -2,17 +2,17 @@ function f() { } var r = f; // parse error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. class C { foo: T; } var c = new C; // parse error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericChainedCalls.errors.txt b/tests/baselines/reference/genericChainedCalls.errors.txt index 96ef5a3340..e4f4dbfd37 100644 --- a/tests/baselines/reference/genericChainedCalls.errors.txt +++ b/tests/baselines/reference/genericChainedCalls.errors.txt @@ -8,12 +8,12 @@ var r1 = v1.func(num => num.toString()) .func(str => str.length) // error, number doesn't have a length ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. .func(num => num.toString()) var s1 = v1.func(num => num.toString()) var s2 = s1.func(str => str.length) // should also error ~~~~~~ -!!! Property 'length' does not exist on type 'number'. +!!! error TS2339: Property 'length' does not exist on type 'number'. var s3 = s2.func(num => num.toString()) \ No newline at end of file diff --git a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt index 588e70eb39..ff816921b0 100644 --- a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt +++ b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.errors.txt @@ -3,29 +3,29 @@ class Foo { static a = (n: T) => { }; ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static b: T; ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static c: T[] = []; ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static d = false || ((x: T) => x || undefined)(null) ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static e = function (x: T) { return null; } ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. static f(xs: T[]): T[] { ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. ~ -!!! Static members cannot reference class type parameters. +!!! error TS2302: Static members cannot reference class type parameters. return xs.reverse(); } } diff --git a/tests/baselines/reference/genericClassesRedeclaration.errors.txt b/tests/baselines/reference/genericClassesRedeclaration.errors.txt index 63263f3d6a..4caeeb5dd8 100644 --- a/tests/baselines/reference/genericClassesRedeclaration.errors.txt +++ b/tests/baselines/reference/genericClassesRedeclaration.errors.txt @@ -42,7 +42,7 @@ interface IIndexable { [s: string]: T; ~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } function createIntrinsicsObject(): IIndexable; interface IHashTable { @@ -57,7 +57,7 @@ } class StringHashTable implements IHashTable { ~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'StringHashTable'. +!!! error TS2300: Duplicate identifier 'StringHashTable'. private itemCount; private table; public getAllKeys(): string[]; @@ -72,7 +72,7 @@ } class IdentiferNameHashTable extends StringHashTable { ~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate identifier 'IdentiferNameHashTable'. +!!! error TS2300: Duplicate identifier 'IdentiferNameHashTable'. public getAllKeys(): string[]; public add(key: string, data: T): boolean; public addOrUpdate(key: string, data: T): boolean; diff --git a/tests/baselines/reference/genericCloduleInModule2.errors.txt b/tests/baselines/reference/genericCloduleInModule2.errors.txt index 38202cd40e..7c4c8f7b23 100644 --- a/tests/baselines/reference/genericCloduleInModule2.errors.txt +++ b/tests/baselines/reference/genericCloduleInModule2.errors.txt @@ -14,5 +14,5 @@ var b: A.B; ~~~ -!!! Generic type 'B' requires 1 type argument(s). +!!! error TS2314: Generic type 'B' requires 1 type argument(s). b.foo(); \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes.errors.txt b/tests/baselines/reference/genericCloneReturnTypes.errors.txt index f2ba42e016..e10714f656 100644 --- a/tests/baselines/reference/genericCloneReturnTypes.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes.errors.txt @@ -25,5 +25,5 @@ b = b2; b = b3; ~ -!!! Type 'Bar' is not assignable to type 'Bar': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'Bar' is not assignable to type 'Bar': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt index 06966c7eb2..889e64f548 100644 --- a/tests/baselines/reference/genericCloneReturnTypes2.errors.txt +++ b/tests/baselines/reference/genericCloneReturnTypes2.errors.txt @@ -15,5 +15,5 @@ var c: MyList = a.clone(); // bug was there was an error on this line var d: MyList = a.clone(); // error ~ -!!! Type 'MyList' is not assignable to type 'MyList': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'MyList' is not assignable to type 'MyList': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCombinators2.errors.txt b/tests/baselines/reference/genericCombinators2.errors.txt index aad1732547..3cbd19a6df 100644 --- a/tests/baselines/reference/genericCombinators2.errors.txt +++ b/tests/baselines/reference/genericCombinators2.errors.txt @@ -15,7 +15,7 @@ var rf1 = (x: number, y: string) => { return x.toFixed() }; var r5a = _.map(c2, (x, y) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. +!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. var r5b = _.map(c2, rf1); ~~~ -!!! Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. \ No newline at end of file +!!! error TS2345: Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraint1.errors.txt b/tests/baselines/reference/genericConstraint1.errors.txt index fb61d930f8..2566d3f36d 100644 --- a/tests/baselines/reference/genericConstraint1.errors.txt +++ b/tests/baselines/reference/genericConstraint1.errors.txt @@ -8,4 +8,4 @@ var x = new C(); x.bar2(2, ""); ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. \ No newline at end of file +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraint2.errors.txt b/tests/baselines/reference/genericConstraint2.errors.txt index cce6068827..5afb1e5e48 100644 --- a/tests/baselines/reference/genericConstraint2.errors.txt +++ b/tests/baselines/reference/genericConstraint2.errors.txt @@ -5,7 +5,7 @@ function compare>(x: T, y: T): number { ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. if (x == null) return y == null ? 0 : -1; if (y == null) return 1; return x.comparer(y); @@ -13,8 +13,8 @@ class ComparableString implements Comparable{ ~~~~~~~~~~~~~~~~ -!!! Class 'ComparableString' incorrectly implements interface 'Comparable': -!!! Property 'comparer' is missing in type 'ComparableString'. +!!! error TS2421: Class 'ComparableString' incorrectly implements interface 'Comparable': +!!! error TS2421: Property 'comparer' is missing in type 'ComparableString'. constructor(public currentValue: string) { } localeCompare(other) { @@ -26,5 +26,5 @@ var b = new ComparableString("b"); var c = compare(a, b); ~~~~~~~~~~~~~~~~ -!!! Type 'ComparableString' does not satisfy the constraint 'Comparable': -!!! Property 'comparer' is missing in type 'ComparableString'. \ No newline at end of file +!!! error TS2343: Type 'ComparableString' does not satisfy the constraint 'Comparable': +!!! error TS2343: Property 'comparer' is missing in type 'ComparableString'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraint3.errors.txt b/tests/baselines/reference/genericConstraint3.errors.txt index d7d76b7de6..9dd2c13370 100644 --- a/tests/baselines/reference/genericConstraint3.errors.txt +++ b/tests/baselines/reference/genericConstraint3.errors.txt @@ -2,5 +2,5 @@ interface C

{ x: P; } interface A> { x: U; } ~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. interface B extends A<{}, { x: {} }> { } // Should not produce an error \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt index 8b3673de74..6856d74893 100644 --- a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt +++ b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt @@ -6,7 +6,7 @@ var x: I<{s: string}> x.f({s: 1}) ~~~~~~ -!!! Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. -!!! Types of property 's' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. +!!! error TS2345: Types of property 's' are incompatible: +!!! error TS2345: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt b/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt index e1ff11eee9..811460c45c 100644 --- a/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt +++ b/tests/baselines/reference/genericConstructExpressionWithoutArgs.errors.txt @@ -9,7 +9,7 @@ var c = new C // C var c2 = new C // error, type params are actually part of the arg list so you need both ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt b/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt index cee2b8583e..5633ab4857 100644 --- a/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt +++ b/tests/baselines/reference/genericConstructInvocationWithNoTypeArg.errors.txt @@ -4,5 +4,5 @@ } var f2: Foo = new Foo(3); ~~~ -!!! Cannot find name 'Foo'. +!!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstructorFunction1.errors.txt b/tests/baselines/reference/genericConstructorFunction1.errors.txt index 14ac7d99b3..5d5bfec43f 100644 --- a/tests/baselines/reference/genericConstructorFunction1.errors.txt +++ b/tests/baselines/reference/genericConstructorFunction1.errors.txt @@ -4,7 +4,7 @@ var v2 = v1['test']; v2(args); ~~~~~~~~ -!!! Value of type 'new (arg: T) => Date' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'new (arg: T) => Date' is not callable. Did you mean to include 'new'? return new v2(args); // used to give error } @@ -15,6 +15,6 @@ var v2 = v1['test']; var y = v2(args); ~~~~~~~~ -!!! Value of type 'I1' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'I1' is not callable. Did you mean to include 'new'? return new v2(args); // used to give error } \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt index 97da05bd69..73660e7a53 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase.errors.txt @@ -11,7 +11,7 @@ var y: B; x = y; // error ~ -!!! Type 'B' is not assignable to type 'A': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'B' is not assignable to type 'A': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt index 74cb9d29c1..9ea106bcb5 100644 --- a/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt +++ b/tests/baselines/reference/genericDerivedTypeWithSpecializedBase2.errors.txt @@ -11,8 +11,8 @@ var y: B; x = y; // error ~ -!!! Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '{ length: number; foo: number; }': -!!! Property 'foo' is missing in type 'String'. +!!! error TS2322: Type 'B' is not assignable to type 'A<{ length: number; foo: number; }>': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type '{ length: number; foo: number; }': +!!! error TS2322: Property 'foo' is missing in type 'String'. \ No newline at end of file diff --git a/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt b/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt index 19c27783c1..33a75ecc27 100644 --- a/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt +++ b/tests/baselines/reference/genericFunctionCallSignatureReturnTypeMismatch.errors.txt @@ -10,5 +10,5 @@ console.log(s); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. \ No newline at end of file diff --git a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt index 0948a26e76..b55ba6cdd7 100644 --- a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt +++ b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.errors.txt @@ -2,4 +2,4 @@ declare function map(f: (x: T) => U, xs: T[]): U[]; map((a) => a.length, [1]); ~~~~~~ -!!! Property 'length' does not exist on type 'number'. \ No newline at end of file +!!! error TS2339: Property 'length' does not exist on type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt b/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt index 8cc016566d..40d5477b1f 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters2.errors.txt @@ -7,7 +7,7 @@ utils.fold(); // error ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. utils.fold(null); // no error utils.fold(null, null); // no error utils.fold(null, null, null); // error: Unable to invoke type with no call signatures diff --git a/tests/baselines/reference/genericFunduleInModule.errors.txt b/tests/baselines/reference/genericFunduleInModule.errors.txt index 1bc7272671..db8314d548 100644 --- a/tests/baselines/reference/genericFunduleInModule.errors.txt +++ b/tests/baselines/reference/genericFunduleInModule.errors.txt @@ -8,5 +8,5 @@ var b: A.B; ~~~ -!!! Module 'A' has no exported member 'B'. +!!! error TS2305: Module 'A' has no exported member 'B'. A.B(1); \ No newline at end of file diff --git a/tests/baselines/reference/genericFunduleInModule2.errors.txt b/tests/baselines/reference/genericFunduleInModule2.errors.txt index 306dd66d51..9313330806 100644 --- a/tests/baselines/reference/genericFunduleInModule2.errors.txt +++ b/tests/baselines/reference/genericFunduleInModule2.errors.txt @@ -11,5 +11,5 @@ var b: A.B; ~~~ -!!! Module 'A' has no exported member 'B'. +!!! error TS2305: Module 'A' has no exported member 'B'. A.B(1); \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter.errors.txt b/tests/baselines/reference/genericGetter.errors.txt index 84b2a32058..9adc117b82 100644 --- a/tests/baselines/reference/genericGetter.errors.txt +++ b/tests/baselines/reference/genericGetter.errors.txt @@ -3,7 +3,7 @@ data: T; get x(): T { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.data; } } @@ -11,4 +11,4 @@ var c = new C(); var r: string = c.x; ~ -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter2.errors.txt b/tests/baselines/reference/genericGetter2.errors.txt index 5c30fe0da9..ec7f897e98 100644 --- a/tests/baselines/reference/genericGetter2.errors.txt +++ b/tests/baselines/reference/genericGetter2.errors.txt @@ -5,9 +5,9 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). return this.data; } } \ No newline at end of file diff --git a/tests/baselines/reference/genericGetter3.errors.txt b/tests/baselines/reference/genericGetter3.errors.txt index ff1e7d5a1f..1af22b8eb4 100644 --- a/tests/baselines/reference/genericGetter3.errors.txt +++ b/tests/baselines/reference/genericGetter3.errors.txt @@ -5,7 +5,7 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.data; } } @@ -13,4 +13,4 @@ var c = new C(); var r: string = c.x; ~ -!!! Type 'A' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'A' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt b/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt index 59b4d33a38..61eb48d1b6 100644 --- a/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt +++ b/tests/baselines/reference/genericInterfacesWithoutTypeArguments.errors.txt @@ -3,8 +3,8 @@ class C { } var i: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var c: C; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt index 27623b6eba..a408117bd1 100644 --- a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt +++ b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.errors.txt @@ -7,5 +7,5 @@ } foo((arg: Foo) => { return arg.x; }); ~~~ -!!! Generic type 'Foo' requires 1 type argument(s). +!!! error TS2314: Generic type 'Foo' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericMemberFunction.errors.txt b/tests/baselines/reference/genericMemberFunction.errors.txt index 4e9e6a0b0d..b0807a0cfc 100644 --- a/tests/baselines/reference/genericMemberFunction.errors.txt +++ b/tests/baselines/reference/genericMemberFunction.errors.txt @@ -2,37 +2,37 @@ export class BuildError{ public parent(): FileWithErrors { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } } export class FileWithErrors{ public errors(): BuildError[] { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } public parent(): BuildResult { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } } export class BuildResult{ public merge(other: BuildResult): void { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. a.b.c.d.e.f.g = 0; ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. removedFiles.forEach((each: FileWithErrors) => { ~~~~~~~~~~~~ -!!! Cannot find name 'removedFiles'. +!!! error TS2304: Cannot find name 'removedFiles'. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. this.removeFile(each); ~~~~~~~~~~ -!!! Property 'removeFile' does not exist on type 'BuildResult'. +!!! error TS2339: Property 'removeFile' does not exist on type 'BuildResult'. }); } } diff --git a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt index 5368c5b832..28fbcae41b 100644 --- a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt +++ b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.errors.txt @@ -1,13 +1,13 @@ ==== tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts (3 errors) ==== function foo(y: T, z: U) { return y; } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. module foo { export var x: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. var y = 1; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt index d6d1f1ae44..7f367a21c8 100644 --- a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt +++ b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter2.errors.txt @@ -3,9 +3,9 @@ module foo { export var x: T; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. var y = 1; ~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericNewInterface.errors.txt b/tests/baselines/reference/genericNewInterface.errors.txt index a8574f19eb..7692f358b7 100644 --- a/tests/baselines/reference/genericNewInterface.errors.txt +++ b/tests/baselines/reference/genericNewInterface.errors.txt @@ -2,7 +2,7 @@ function createInstance(ctor: new (s: string) => T): T { return new ctor(42); //should be an error ~~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } interface INewable { @@ -12,5 +12,5 @@ function createInstance2(ctor: INewable): T { return new ctor(1024); //should be an error ~~~~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt b/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt index 2d6230b456..5966120e6b 100644 --- a/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt +++ b/tests/baselines/reference/genericObjectCreationWithoutTypeArgs.errors.txt @@ -6,9 +6,9 @@ var x1 = new SS(); // OK var x2 = new SS < number>; // Correctly give error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'number'. +!!! error TS2304: Cannot find name 'number'. var x3 = new SS(); // OK var x4 = new SS; // Should be allowed, but currently give error ('supplied parameters do not match any signature of the call target') \ No newline at end of file diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt index bce0417d81..dfd8501c27 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.errors.txt @@ -9,7 +9,7 @@ } class PullTypeParameterSymbol extends PullTypeSymbol { ~~~~~~~~~~~~~~ -!!! Generic type 'PullTypeSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). } } diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt index ee9aadfdf9..eac7095d97 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.errors.txt @@ -3,9 +3,9 @@ export class MemberName { static create(arg1: any, arg2?: any, arg3?: any): MemberName { ~~~~~~~~~~ -!!! Generic type 'MemberName' requires 3 type argument(s). +!!! error TS2314: Generic type 'MemberName' requires 3 type argument(s). ~~~~~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. } } } @@ -14,26 +14,26 @@ export class PullSymbol { public type: PullTypeSymbol = null; ~~~~~~~~~~~~~~ -!!! Generic type 'PullTypeSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). } export class PullTypeSymbol extends PullSymbol { ~~~~~~~~~~ -!!! Generic type 'PullSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). private _elementType: PullTypeSymbol = null; ~~~~~~~~~~~~~~ -!!! Generic type 'PullTypeSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullTypeSymbol' requires 3 type argument(s). public toString(scopeSymbol?: PullSymbol, useConstraintInName?: boolean) { ~~~~~~~~~~ -!!! Generic type 'PullSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString(); return s; } public getScopedNameEx(scopeSymbol?: PullSymbol, useConstraintInName?: boolean, getPrettyTypeName?: boolean, getTypeParamMarkerInfo?: boolean) { ~~~~~~~~~~ -!!! Generic type 'PullSymbol' requires 3 type argument(s). +!!! error TS2314: Generic type 'PullSymbol' requires 3 type argument(s). if (this.isArray()) { ~~~~~~~ -!!! Property 'isArray' does not exist on type 'PullTypeSymbol'. +!!! error TS2339: Property 'isArray' does not exist on type 'PullTypeSymbol'. var elementMemberName = this._elementType ? (this._elementType.isArray() || this._elementType.isNamedTypeSymbol() ? this._elementType.getScopedNameEx(scopeSymbol, false, getPrettyTypeName, getTypeParamMarkerInfo) : diff --git a/tests/baselines/reference/genericReduce.errors.txt b/tests/baselines/reference/genericReduce.errors.txt index 4008fddb91..67f66cf979 100644 --- a/tests/baselines/reference/genericReduce.errors.txt +++ b/tests/baselines/reference/genericReduce.errors.txt @@ -6,15 +6,15 @@ n1.x = "fail"; // should error, as 'n1' should be type 'number', not 'any'. ~ -!!! Property 'x' does not exist on type 'number'. +!!! error TS2339: Property 'x' does not exist on type 'number'. n1.toExponential(2); // should not error if 'n1' is correctly number. n2.x = "fail"; // should error, as 'n2' should be type 'number', not 'any'. ~ -!!! Property 'x' does not exist on type 'number'. +!!! error TS2339: Property 'x' does not exist on type 'number'. n2.toExponential(2); // should not error if 'n2' is correctly number. var n3 = b.reduce( (x, y) => x + y, ""); // Initial value is of type string n3.toExponential(2); // should error if 'n3' is correctly type 'string' ~~~~~~~~~~~~~ -!!! Property 'toExponential' does not exist on type 'string'. +!!! error TS2339: Property 'toExponential' does not exist on type 'string'. n3.charAt(0); // should not error if 'n3' is correctly type 'string' \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArgs.errors.txt b/tests/baselines/reference/genericRestArgs.errors.txt index a23bec39f0..5204886044 100644 --- a/tests/baselines/reference/genericRestArgs.errors.txt +++ b/tests/baselines/reference/genericRestArgs.errors.txt @@ -5,7 +5,7 @@ var a1Gc = makeArrayG(1, ""); var a1Gd = makeArrayG(1, ""); // error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. function makeArrayGOpt(item1?: T, item2?: T, item3?: T) { return [item1, item2, item3]; @@ -14,4 +14,4 @@ var a2Gb = makeArrayG(1, ""); var a2Gc = makeArrayG(1, ""); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'any[]'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt b/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt index 939cf38cb0..a87ba30067 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt @@ -5,9 +5,9 @@ export class DbSet { _entityType: A; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). get entityType() { return this._entityType; } // used to ICE without return type annotation ~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/genericSpecializations2.errors.txt b/tests/baselines/reference/genericSpecializations2.errors.txt index 038c65e0e4..4a26a0e0a2 100644 --- a/tests/baselines/reference/genericSpecializations2.errors.txt +++ b/tests/baselines/reference/genericSpecializations2.errors.txt @@ -8,13 +8,13 @@ class IntFooBad implements IFoo { foo(x: string): string { return null; } ~~~~~~ -!!! Type parameter name cannot be 'string' +!!! error TS2368: Type parameter name cannot be 'string' } class StringFoo2 implements IFoo { foo(x: string): string { return null; } ~~~~~~ -!!! Type parameter name cannot be 'string' +!!! error TS2368: Type parameter name cannot be 'string' } class StringFoo3 implements IFoo { diff --git a/tests/baselines/reference/genericSpecializations3.errors.txt b/tests/baselines/reference/genericSpecializations3.errors.txt index b4bf9f64bf..3236b49679 100644 --- a/tests/baselines/reference/genericSpecializations3.errors.txt +++ b/tests/baselines/reference/genericSpecializations3.errors.txt @@ -8,11 +8,11 @@ class IntFooBad implements IFoo { // error ~~~~~~~~~ -!!! Class 'IntFooBad' incorrectly implements interface 'IFoo': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => string' is not assignable to type '(x: number) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'IntFooBad' incorrectly implements interface 'IFoo': +!!! error TS2421: Types of property 'foo' are incompatible: +!!! error TS2421: Type '(x: string) => string' is not assignable to type '(x: number) => number': +!!! error TS2421: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2421: Type 'string' is not assignable to type 'number'. foo(x: string): string { return null; } } @@ -34,18 +34,18 @@ intFoo = stringFoo2; // error ~~~~~~ -!!! Type 'StringFoo2' is not assignable to type 'IntFoo': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => string' is not assignable to type '(x: number) => number': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'StringFoo2' is not assignable to type 'IntFoo': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: string) => string' is not assignable to type '(x: number) => number': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. stringFoo2 = intFoo; // error ~~~~~~~~~~ -!!! Type 'IntFoo' is not assignable to type 'StringFoo2': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: number) => number' is not assignable to type '(x: string) => string': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'IntFoo' is not assignable to type 'StringFoo2': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: number) => number' is not assignable to type '(x: string) => string': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. class StringFoo3 implements IFoo { // error diff --git a/tests/baselines/reference/genericTypeAssertions1.errors.txt b/tests/baselines/reference/genericTypeAssertions1.errors.txt index 7ab9e05661..842cdee2d8 100644 --- a/tests/baselines/reference/genericTypeAssertions1.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions1.errors.txt @@ -3,13 +3,13 @@ var foo = new A(); var r: A = >new A(); // error ~ -!!! Type 'A' is not assignable to type 'A': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Type 'number' is not assignable to type 'string'. var r2: A = >>foo; // error ~~ -!!! Type 'A>' is not assignable to type 'A': -!!! Type 'A' is not assignable to type 'number'. +!!! error TS2322: Type 'A>' is not assignable to type 'A': +!!! error TS2322: Type 'A' is not assignable to type 'number'. ~~~~~~~~~~~~~~~~~ -!!! Neither type 'A' nor type 'A>' is assignable to the other: -!!! Type 'number' is not assignable to type 'A': -!!! Property 'foo' is missing in type 'Number'. \ No newline at end of file +!!! error TS2353: Neither type 'A' nor type 'A>' is assignable to the other: +!!! error TS2353: Type 'number' is not assignable to type 'A': +!!! error TS2353: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions2.errors.txt b/tests/baselines/reference/genericTypeAssertions2.errors.txt index 886031edaa..113a3cf4db 100644 --- a/tests/baselines/reference/genericTypeAssertions2.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions2.errors.txt @@ -10,17 +10,17 @@ var r: A = >new B(); var r2: A = >new B(); // error ~~ -!!! Type 'B' is not assignable to type 'A': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => void' is not assignable to type '(x: number) => void': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'B' is not assignable to type 'A': +!!! error TS2322: Types of property 'foo' are incompatible: +!!! error TS2322: Type '(x: string) => void' is not assignable to type '(x: number) => void': +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. var r3: B = >new B(); // error ~~ -!!! Type 'A' is not assignable to type 'B': -!!! Property 'bar' is missing in type 'A'. +!!! error TS2322: Type 'A' is not assignable to type 'B': +!!! error TS2322: Property 'bar' is missing in type 'A'. var r4: A = >new A(); var r5: A = >[]; // error ~~~~~~~~~~~~~ -!!! Neither type 'undefined[]' nor type 'A' is assignable to the other: -!!! Property 'foo' is missing in type 'undefined[]'. \ No newline at end of file +!!! error TS2353: Neither type 'undefined[]' nor type 'A' is assignable to the other: +!!! error TS2353: Property 'foo' is missing in type 'undefined[]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions4.errors.txt b/tests/baselines/reference/genericTypeAssertions4.errors.txt index c109b6988e..66a988a6c0 100644 --- a/tests/baselines/reference/genericTypeAssertions4.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions4.errors.txt @@ -19,18 +19,18 @@ var y = x; y = a; // error: cannot convert A to T ~ -!!! Type 'A' is not assignable to type 'T'. +!!! error TS2323: Type 'A' is not assignable to type 'T'. y = b; // error: cannot convert B to T ~ -!!! Type 'B' is not assignable to type 'T'. +!!! error TS2323: Type 'B' is not assignable to type 'T'. y = c; // error: cannot convert C to T ~ -!!! Type 'C' is not assignable to type 'T'. +!!! error TS2323: Type 'C' is not assignable to type 'T'. y = a; y = b; // error: cannot convert B to T ~~~~ -!!! Neither type 'B' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'B' nor type 'T' is assignable to the other. y = c; // error: cannot convert C to T ~~~~ -!!! Neither type 'C' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'C' nor type 'T' is assignable to the other. } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions5.errors.txt b/tests/baselines/reference/genericTypeAssertions5.errors.txt index 7fe2352727..83b40f3c08 100644 --- a/tests/baselines/reference/genericTypeAssertions5.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions5.errors.txt @@ -19,18 +19,18 @@ var y = x; y = a; // error: cannot convert A to T ~ -!!! Type 'A' is not assignable to type 'T'. +!!! error TS2323: Type 'A' is not assignable to type 'T'. y = b; // error: cannot convert B to T ~ -!!! Type 'B' is not assignable to type 'T'. +!!! error TS2323: Type 'B' is not assignable to type 'T'. y = c; // error: cannot convert C to T ~ -!!! Type 'C' is not assignable to type 'T'. +!!! error TS2323: Type 'C' is not assignable to type 'T'. y = a; y = b; // error: cannot convert B to T ~~~~ -!!! Neither type 'B' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'B' nor type 'T' is assignable to the other. y = c; // error: cannot convert C to T ~~~~ -!!! Neither type 'C' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'C' nor type 'T' is assignable to the other. } \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeAssertions6.errors.txt b/tests/baselines/reference/genericTypeAssertions6.errors.txt index 99d7f6b850..2b767e6cc0 100644 --- a/tests/baselines/reference/genericTypeAssertions6.errors.txt +++ b/tests/baselines/reference/genericTypeAssertions6.errors.txt @@ -8,10 +8,10 @@ f(x: T, y: U) { x = y; ~~~~ -!!! Neither type 'U' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'U' nor type 'T' is assignable to the other. y = x; ~~~~ -!!! Neither type 'T' nor type 'U' is assignable to the other. +!!! error TS2352: Neither type 'T' nor type 'U' is assignable to the other. } } @@ -23,7 +23,7 @@ var d = new Date(); var e = new Date(); ~~~~~~~~~~~~~~~~ -!!! Neither type 'U' nor type 'T' is assignable to the other. +!!! error TS2352: Neither type 'U' nor type 'T' is assignable to the other. } } diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt index b3fdd2a93a..b45c671295 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.d.errors.txt @@ -8,33 +8,33 @@ declare var c: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var a: { x: C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var b: { (x: C): C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var d: { [x: C]: C }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function f(x: C): C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare class D extends C {} ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare module M { export class E { foo: T } @@ -42,14 +42,14 @@ declare class D2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. declare class D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). declare function h(x: T); ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function i(x: T); ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt index e8fee6f002..d57034f084 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.errors.txt @@ -8,54 +8,54 @@ var c: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var a: { x: C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var b: { (x: C): C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var d: { [x: C]: C }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var e = (x: C) => { var y: C; return y; } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). function f(x: C): C { var y: C; return y; } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var g = function f(x: C): C { var y: C; return y; } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). class D extends C { ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). } interface I extends C {} ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). module M { export class E { foo: T } @@ -63,24 +63,24 @@ class D2 extends M.E { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). class D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). interface I2 extends M.E { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). function h(x: T) { } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). function i(x: T) { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). var j = null; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var k = null; ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt index 0513aaff05..66367f352a 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.errors.txt @@ -8,54 +8,54 @@ var c: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var a: { x: I }; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var b: { (x: I): I }; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var d: { [x: I]: I }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var e = (x: I) => { var y: I; return y; } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). function f(x: I): I { var y: I; return y; } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var g = function f(x: I): I { var y: I; return y; } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). class D extends I { ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). } interface U extends I {} ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). module M { export interface E { foo: T } @@ -63,24 +63,24 @@ class D2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. interface D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). interface I2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. function h(x: T) { } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). function i(x: T) { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). var j = null; ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. var k = null; ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt index 7b0e4ba6fb..f86afea232 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument3.errors.txt @@ -8,33 +8,33 @@ declare var c: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var a: { x: C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var b: { (x: C): C }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare var d: { [x: C]: C }; ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function f(x: C): C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare class D extends C {} ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare module M { export class E { foo: T } @@ -42,14 +42,14 @@ declare class D2 extends M.C { } ~~~ -!!! Module 'M' has no exported member 'C'. +!!! error TS2305: Module 'M' has no exported member 'C'. declare class D3 { } ~~~ -!!! Generic type 'E' requires 1 type argument(s). +!!! error TS2314: Generic type 'E' requires 1 type argument(s). declare function h(x: T); ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). declare function i(x: T); ~~~ -!!! Generic type 'E' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt index 6f464ab0ea..6a52ab0620 100644 --- a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt +++ b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.errors.txt @@ -7,14 +7,14 @@ } var c1: C; // error ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var i1: I; // error ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var c2: C; // should be an error ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var i2: I; // should be an error ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt index 8f923d6bdb..2d7bca3afa 100644 --- a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt +++ b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments1.errors.txt @@ -2,5 +2,5 @@ interface Foo { } class Bar implements Foo { } ~~~ -!!! Generic type 'Foo' requires 1 type argument(s). +!!! error TS2314: Generic type 'Foo' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt index b6f9510b52..f8a16f110e 100644 --- a/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt +++ b/tests/baselines/reference/genericTypeUsedWithoutTypeArguments3.errors.txt @@ -2,5 +2,5 @@ interface Foo { } interface Bar extends Foo { } ~~~ -!!! Generic type 'Foo' requires 1 type argument(s). +!!! error TS2314: Generic type 'Foo' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt index 2b755e16db..e56adef374 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.errors.txt @@ -4,23 +4,23 @@ } class X implements I { ~ -!!! Class 'X' incorrectly implements interface 'I': -!!! Types of property 'f' are incompatible: -!!! Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void': -!!! Types of parameters 'a' and 'a' are incompatible: -!!! Type 'T' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'X' incorrectly implements interface 'I': +!!! error TS2421: Types of property 'f' are incompatible: +!!! error TS2421: Type '(a: T) => void' is not assignable to type '(a: { a: number; }) => void': +!!! error TS2421: Types of parameters 'a' and 'a' are incompatible: +!!! error TS2421: Type 'T' is not assignable to type '{ a: number; }': +!!! error TS2421: Types of property 'a' are incompatible: +!!! error TS2421: Type 'string' is not assignable to type 'number'. f(a: T): void { } } var x = new X<{ a: string }>(); var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' ~ -!!! Type 'X<{ a: string; }>' is not assignable to type 'I': -!!! Types of property 'f' are incompatible: -!!! Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void': -!!! Types of parameters 'a' and 'a' are incompatible: -!!! Type '{ a: string; }' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'X<{ a: string; }>' is not assignable to type 'I': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '(a: { a: string; }) => void' is not assignable to type '(a: { a: number; }) => void': +!!! error TS2322: Types of parameters 'a' and 'a' are incompatible: +!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ a: number; }': +!!! error TS2322: Types of property 'a' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt index 98b077e1a7..29a0be85ce 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt @@ -7,12 +7,12 @@ x.foo(1); // no error var f = (x: B) => { return x.foo(1); } // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'T'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. var f2 = (x: B) => { return x.foo(1); } // error ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f3 = (x: B) => { return x.foo(1); } // error ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var f4 = (x: B) => { return x.foo(1); } // no error \ No newline at end of file diff --git a/tests/baselines/reference/generics1.errors.txt b/tests/baselines/reference/generics1.errors.txt index 030a820e6c..553e1d2f10 100644 --- a/tests/baselines/reference/generics1.errors.txt +++ b/tests/baselines/reference/generics1.errors.txt @@ -10,14 +10,14 @@ var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! Type 'A' does not satisfy the constraint 'B': -!!! Property 'b' is missing in type 'A'. +!!! error TS2343: Type 'A' does not satisfy the constraint 'B': +!!! error TS2343: Property 'b' is missing in type 'A'. var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments ~~~~~~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). var v7: G; // Error, no type arguments ~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/generics2.errors.txt b/tests/baselines/reference/generics2.errors.txt index 0d4742bc0e..5b4b33f93f 100644 --- a/tests/baselines/reference/generics2.errors.txt +++ b/tests/baselines/reference/generics2.errors.txt @@ -17,14 +17,14 @@ var v2: G<{ a: string }, C>; // Ok, equivalent to G var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! Type 'A' does not satisfy the constraint 'B': -!!! Property 'b' is missing in type 'A'. +!!! error TS2343: Type 'A' does not satisfy the constraint 'B': +!!! error TS2343: Property 'b' is missing in type 'A'. var v4: G, C>; // Ok var v5: G; // Error, any does not satisfy constraint B var v6: G; // Error, wrong number of arguments ~~~~~~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). var v7: G; // Error, no type arguments ~ -!!! Generic type 'G' requires 2 type argument(s). +!!! error TS2314: Generic type 'G' requires 2 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/generics4.errors.txt b/tests/baselines/reference/generics4.errors.txt index 9e2f1a5ccd..97a0937d5b 100644 --- a/tests/baselines/reference/generics4.errors.txt +++ b/tests/baselines/reference/generics4.errors.txt @@ -7,8 +7,8 @@ a = b; // Not ok - return types of "f" are different ~ -!!! Type 'C' is not assignable to type 'C': -!!! Type 'Y' is not assignable to type 'X': -!!! Types of property 'f' are incompatible: -!!! Type '() => boolean' is not assignable to type '() => string': -!!! Type 'boolean' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'C': +!!! error TS2322: Type 'Y' is not assignable to type 'X': +!!! error TS2322: Types of property 'f' are incompatible: +!!! error TS2322: Type '() => boolean' is not assignable to type '() => string': +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/generics5.errors.txt b/tests/baselines/reference/generics5.errors.txt index 74f5d0e6e2..c32642a102 100644 --- a/tests/baselines/reference/generics5.errors.txt +++ b/tests/baselines/reference/generics5.errors.txt @@ -10,7 +10,7 @@ var v3: G; // Error, A not valid argument for U ~~~~~~~ -!!! Type 'A' does not satisfy the constraint 'B': -!!! Property 'b' is missing in type 'A'. +!!! error TS2343: Type 'A' does not satisfy the constraint 'B': +!!! error TS2343: Property 'b' is missing in type 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt index 052822f1ba..05f28a3878 100644 --- a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.errors.txt @@ -1,37 +1,37 @@ ==== tests/cases/compiler/genericsWithDuplicateTypeParameters1.ts (10 errors) ==== function f() { } ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. function f2(a: X, b: X): X { return null; } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. class C { ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. public f() {} ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. public f2(a: X, b: X): X { return null; } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. } interface I { ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. f(); ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. f2(a: X, b: X): X; ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. } var m = { a: function f() {}, ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. b: function f2(a: X, b: X): X { return null; } ~ -!!! Duplicate identifier 'X'. +!!! error TS2300: Duplicate identifier 'X'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt b/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt index eb0aac2035..23d50286b0 100644 --- a/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericsWithoutTypeParameters1.errors.txt @@ -9,56 +9,56 @@ var c1: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var i1: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var c2: C; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). var i2: I; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). function foo(x: C, y: I) { } ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). function foo2(x: C, y: I) { } ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var x: { a: C } = { a: new C() }; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). var x2: { a: I } = { a: { bar() { return 1 } } }; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). class D { x: C; ~ -!!! Generic type 'C' requires 1 type argument(s). +!!! error TS2314: Generic type 'C' requires 1 type argument(s). y: D; ~ -!!! Generic type 'D' requires 1 type argument(s). +!!! error TS2314: Generic type 'D' requires 1 type argument(s). } interface J { x: I; ~ -!!! Generic type 'I' requires 1 type argument(s). +!!! error TS2314: Generic type 'I' requires 1 type argument(s). y: J; ~ -!!! Generic type 'J' requires 1 type argument(s). +!!! error TS2314: Generic type 'J' requires 1 type argument(s). } class A { } function f(x: T): A { ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). return null; } \ No newline at end of file diff --git a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt index 2a3e67203c..8fc95d332e 100644 --- a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt +++ b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts (4 errors) ==== declare function _(value: Array): _; ~~~~ -!!! Cannot find name '_'. +!!! error TS2304: Cannot find name '_'. declare function _(value: T): _; ~~~~ -!!! Cannot find name '_'. +!!! error TS2304: Cannot find name '_'. declare module _ { export function each( @@ -19,7 +19,7 @@ declare class _ { ~ -!!! Duplicate identifier '_'. +!!! error TS2300: Duplicate identifier '_'. each(iterator: _.ListIterator, context?: any): void; } @@ -27,7 +27,7 @@ export class MyClass { public get myGetter() { ~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var obj:any = {}; return obj; diff --git a/tests/baselines/reference/getAndSetAsMemberNames.errors.txt b/tests/baselines/reference/getAndSetAsMemberNames.errors.txt index ca92470e01..6faec2818c 100644 --- a/tests/baselines/reference/getAndSetAsMemberNames.errors.txt +++ b/tests/baselines/reference/getAndSetAsMemberNames.errors.txt @@ -19,6 +19,6 @@ get (): boolean { return true; } set t(x) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt index dbb4e935f2..8a85731e40 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt @@ -2,16 +2,16 @@ class C { get x(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~ return 1; ~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. set x(v: string) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. } \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt index 4589f52960..de7e13bd4d 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt @@ -5,25 +5,25 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~ return this.data; ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. set x(v: A) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~ this.data = v; ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ -!!! Type 'A' is not assignable to type 'A': -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Type 'string' is not assignable to type 'T'. } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. } var x = new C(); diff --git a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt index 193f761320..609342a729 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt @@ -5,25 +5,25 @@ data: A; get x(): A { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~ return this.data; ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. set x(v: A) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~ this.data = v; ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ -!!! Type 'A' is not assignable to type 'A': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'A' is not assignable to type 'A': +!!! error TS2322: Type 'string' is not assignable to type 'number'. } ~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. } var x = new C(); diff --git a/tests/baselines/reference/getsetReturnTypes.errors.txt b/tests/baselines/reference/getsetReturnTypes.errors.txt index 8b9b68e87c..aa8000742e 100644 --- a/tests/baselines/reference/getsetReturnTypes.errors.txt +++ b/tests/baselines/reference/getsetReturnTypes.errors.txt @@ -3,7 +3,7 @@ return { get x() { return x; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } }; var x = makePoint(2).x; diff --git a/tests/baselines/reference/getterMissingReturnError.errors.txt b/tests/baselines/reference/getterMissingReturnError.errors.txt index ae560c5de8..fdb274556b 100644 --- a/tests/baselines/reference/getterMissingReturnError.errors.txt +++ b/tests/baselines/reference/getterMissingReturnError.errors.txt @@ -2,9 +2,9 @@ class test { public get p2(){ ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } } diff --git a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt index 8b1a7a10a3..bfb8d49edf 100644 --- a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt +++ b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt @@ -2,7 +2,7 @@ class Greeter { public get greet(): string { ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. throw ''; // should not raise an error } public greeting(): string { diff --git a/tests/baselines/reference/gettersAndSetters.errors.txt b/tests/baselines/reference/gettersAndSetters.errors.txt index c17653545f..f0758c7a91 100644 --- a/tests/baselines/reference/gettersAndSetters.errors.txt +++ b/tests/baselines/reference/gettersAndSetters.errors.txt @@ -7,17 +7,17 @@ public get Foo() { return this.fooBack;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo:string) {this.fooBack = foo;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get Bar() {return C.barBack;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set Bar(bar:string) {C.barBack = bar;} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get = function() {} // ok public set = function() {} // ok @@ -33,17 +33,17 @@ var baz = c.Baz; ~~~ -!!! Property 'Baz' does not exist on type 'C'. +!!! error TS2339: Property 'Baz' does not exist on type 'C'. c.Baz = "bazv"; ~~~ -!!! Property 'Baz' does not exist on type 'C'. +!!! error TS2339: Property 'Baz' does not exist on type 'C'. // The Foo accessors' return and param types should be contextually typed to the Foo field var o : {Foo:number;} = {get Foo() {return 0;}, set Foo(val:number){val}}; // o ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var ofg = o.Foo; o.Foo = 0; diff --git a/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt b/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt index df23e0da36..1bd4318a62 100644 --- a/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt +++ b/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt @@ -2,13 +2,13 @@ class C99 { private get Baz():number { return 0; } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. public set Baz(n:number) {} // error - accessors do not agree in visibility ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. } \ No newline at end of file diff --git a/tests/baselines/reference/gettersAndSettersErrors.errors.txt b/tests/baselines/reference/gettersAndSettersErrors.errors.txt index 1cfefea520..35bfa8260e 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.errors.txt +++ b/tests/baselines/reference/gettersAndSettersErrors.errors.txt @@ -2,33 +2,33 @@ class C { public get Foo() { return "foo";} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo:string) {} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public Foo = 0; // error - duplicate identifier Foo - confirmed ~~~ -!!! Duplicate identifier 'Foo'. +!!! error TS2300: Duplicate identifier 'Foo'. public get Goo(v:string):string {return null;} // error - getters must not have a parameter ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Goo(v:string):string {} // error - setters must not specify a return type ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class E { private get Baz():number { return 0; } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. public set Baz(n:number) {} // error - accessors do not agree in visibility ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Getter and setter accessors do not agree in visibility. +!!! error TS2379: Getter and setter accessors do not agree in visibility. } diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt b/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt index 5b869132a7..193a1ace47 100644 --- a/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt @@ -2,26 +2,26 @@ class C { public get Foo() { return "foo";} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo) {} // ok - type inferred from getter return statement ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get Bar() { return "foo";} // ok ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Bar(bar:string) {} // ok - type must be declared ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var o1 = {get Foo(){return 0;}, set Foo(val){}}; // ok - types agree (inference) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var o2 = {get Foo(){return 0;}, set Foo(val:number){}}; // ok - types agree ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/giant.errors.txt b/tests/baselines/reference/giant.errors.txt index 9f15a5061a..500d429aa6 100644 --- a/tests/baselines/reference/giant.errors.txt +++ b/tests/baselines/reference/giant.errors.txt @@ -24,48 +24,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. interface I { //Call Signature (); @@ -91,13 +91,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -112,7 +112,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; @@ -126,48 +126,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. interface I { //Call Signature (); @@ -193,13 +193,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -214,7 +214,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; @@ -230,7 +230,7 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } @@ -245,48 +245,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. export interface eI { //Call Signature (); @@ -312,13 +312,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -333,7 +333,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; @@ -349,95 +349,95 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private rF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public pgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public get pgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public set psF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private get rgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private set rsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static set tsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static get tgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } interface I { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -454,48 +454,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. export interface eI { //Call Signature (); @@ -521,13 +521,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -542,7 +542,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; @@ -556,48 +556,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. interface I { //Call Signature (); @@ -623,13 +623,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -644,7 +644,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; @@ -660,7 +660,7 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } @@ -675,48 +675,48 @@ public pgF() { } public get pgF() ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. public psF(param:any) { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. public set psF(param:any) ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private get rgF() ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. private rsF(param:any) { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. private set rsF(param:any) ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static tF() { } static tsF(param:any) { } static set tsF(param:any) ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. static get tgF() ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! A 'get' accessor must return a value or consist of a single 'throw' statement. +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. export interface eI { //Call Signature (); @@ -742,13 +742,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -763,7 +763,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; @@ -779,95 +779,95 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { }; export declare module eaM { }; } export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private rF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public pgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public get pgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public set psF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private get rgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private set rsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static set tsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static get tgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } interface I { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -876,92 +876,92 @@ export declare var eaV; export declare function eaF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. export declare class eaC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private rF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public pgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public get pgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'pgF'. +!!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. public set psF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'psF'. +!!! error TS2300: Duplicate identifier 'psF'. private rgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private get rgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rgF'. +!!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. private set rsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'rsF'. +!!! error TS2300: Duplicate identifier 'rsF'. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tsF(param:any) { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static set tsF(param:any) ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tsF'. +!!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static get tgF() ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier 'tgF'. +!!! error TS2300: Duplicate identifier 'tgF'. } export declare module eaM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tV; static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } interface I { //Call Signature @@ -987,13 +987,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -1008,63 +1008,63 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } module M { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } interface I { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } export declare var eaV ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. export declare function eaF() { }; ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export declare class eaC { } ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. export declare module eaM { } ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { constructor () { } ~ -!!! A constructor implementation cannot be declared in an ambient context. +!!! error TS1111: A constructor implementation cannot be declared in an ambient context. public pV; private rV; public pF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. static tV static tF() { } ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. } export interface eI { //Call Signature @@ -1091,13 +1091,13 @@ //Index Signature [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signature p; @@ -1112,23 +1112,23 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } export module eM { var V; function F() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. class C { } module M { } export var eV; export function eF() { }; ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export class eC { } export interface eI { } export module eM { } diff --git a/tests/baselines/reference/grammarAmbiguities.errors.txt b/tests/baselines/reference/grammarAmbiguities.errors.txt index ac6cadc92e..ea7cceaf72 100644 --- a/tests/baselines/reference/grammarAmbiguities.errors.txt +++ b/tests/baselines/reference/grammarAmbiguities.errors.txt @@ -8,9 +8,9 @@ f(g(7)); f(g < A, B > 7); // Should error ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. f(g < A, B > +(7)); // Should error ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/grammarAmbiguities1.errors.txt b/tests/baselines/reference/grammarAmbiguities1.errors.txt index 0c52ec2c98..d0160b0813 100644 --- a/tests/baselines/reference/grammarAmbiguities1.errors.txt +++ b/tests/baselines/reference/grammarAmbiguities1.errors.txt @@ -8,16 +8,16 @@ f(g(7)); f(g < A, B > 7); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~ -!!! Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. +!!! error TS2365: Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. ~~~~~ -!!! Operator '>' cannot be applied to types 'typeof B' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'typeof B' and 'number'. f(g < A, B > +(7)); ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~ -!!! Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. +!!! error TS2365: Operator '<' cannot be applied to types '(x: any) => any' and 'typeof A'. ~~~~~~~~ -!!! Operator '>' cannot be applied to types 'typeof B' and 'number'. +!!! error TS2365: Operator '>' cannot be applied to types 'typeof B' and 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt index 0eaf7593c5..7a51527884 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt @@ -9,7 +9,7 @@ this.test([]); this.test([1, 2, "hi", 5]); // Error ~~~~~~~~~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'string[]'. -!!! Type '{}' is not assignable to type 'string'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'string[]'. +!!! error TS2345: Type '{}' is not assignable to type 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/i3.errors.txt b/tests/baselines/reference/i3.errors.txt index ebdf371ab3..01e47ceafc 100644 --- a/tests/baselines/reference/i3.errors.txt +++ b/tests/baselines/reference/i3.errors.txt @@ -6,5 +6,5 @@ i = x; x = i; ~ -!!! Type 'I3' is not assignable to type '{ one: number; }': -!!! Required property 'one' cannot be reimplemented with optional property in 'I3'. \ No newline at end of file +!!! error TS2322: Type 'I3' is not assignable to type '{ one: number; }': +!!! error TS2322: Required property 'one' cannot be reimplemented with optional property in 'I3'. \ No newline at end of file diff --git a/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt b/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt index 034bfe3026..e197147cbf 100644 --- a/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt +++ b/tests/baselines/reference/identityForSignaturesWithTypeParametersAndAny.errors.txt @@ -5,19 +5,19 @@ var g: (x: T, y: U) => T; var g: (x: any, y: any) => any; ~ -!!! Subsequent variable declarations must have the same type. Variable 'g' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'g' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. var h: (x: T, y: U) => T; var h: (x: any, y: any) => any; ~ -!!! Subsequent variable declarations must have the same type. Variable 'h' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'h' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => any'. var i: (x: T, y: U) => T; var i: (x: any, y: string) => any; ~ -!!! Subsequent variable declarations must have the same type. Variable 'i' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: string) => any'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: string) => any'. var j: (x: T, y: U) => T; var j: (x: any, y: any) => string; ~ -!!! Subsequent variable declarations must have the same type. Variable 'j' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => string'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type '(x: T, y: U) => T', but here has type '(x: any, y: any) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/ifElseWithStatements1.errors.txt b/tests/baselines/reference/ifElseWithStatements1.errors.txt index ccadfd14ce..f1feeb52de 100644 --- a/tests/baselines/reference/ifElseWithStatements1.errors.txt +++ b/tests/baselines/reference/ifElseWithStatements1.errors.txt @@ -2,11 +2,11 @@ if (true) f(); ~ -!!! Cannot find name 'f'. +!!! error TS2304: Cannot find name 'f'. else f(); ~ -!!! Cannot find name 'f'. +!!! error TS2304: Cannot find name 'f'. function foo(): boolean { if (true) diff --git a/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt b/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt index 038d2ad7da..774419ca2b 100644 --- a/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt +++ b/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt @@ -2,8 +2,8 @@ class C { declare foo = 1; ~~~~~~~ -!!! 'declare' modifier cannot appear on a class element. +!!! error TS1031: 'declare' modifier cannot appear on a class element. export bar = 1; ~~~~~~ -!!! 'export' modifier cannot appear on a class element. +!!! error TS1031: 'export' modifier cannot appear on a class element. } \ No newline at end of file diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt b/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt index 41e124d7f1..4f552aecbe 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt @@ -9,42 +9,42 @@ var r2 = () => super(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors var r3 = () => { super(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors var r4 = function () { super(); } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors var r5 = { ~~~~~~~~~~~~~~~~~~ get foo() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~ super(); ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors return 1; ~~~~~~~~~~~~~~~~~~~~~~~~~ }, ~~~~~~~~~~~~~~ set foo(v: number) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ super(); ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ -!!! Super calls are not permitted outside constructors or in nested functions inside constructors +!!! error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors } ~~~~~~~~~~~~~ } ~~~~~~~~~ } ~~~~~ -!!! Constructors for derived classes must contain a 'super' call. +!!! error TS2377: Constructors for derived classes must contain a 'super' call. } \ No newline at end of file diff --git a/tests/baselines/reference/implementClausePrecedingExtends.errors.txt b/tests/baselines/reference/implementClausePrecedingExtends.errors.txt index 997f49a947..caad43ed50 100644 --- a/tests/baselines/reference/implementClausePrecedingExtends.errors.txt +++ b/tests/baselines/reference/implementClausePrecedingExtends.errors.txt @@ -2,9 +2,9 @@ class C { foo: number } class D implements C extends C { } ~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Class 'D' incorrectly implements interface 'C': -!!! Property 'foo' is missing in type 'D'. \ No newline at end of file +!!! error TS2421: Class 'D' incorrectly implements interface 'C': +!!! error TS2421: Property 'foo' is missing in type 'D'. \ No newline at end of file diff --git a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt index 209749db46..bb635e117f 100644 --- a/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt +++ b/tests/baselines/reference/implementGenericWithMismatchedTypes.errors.txt @@ -7,11 +7,11 @@ } class C implements IFoo { // error ~ -!!! Class 'C' incorrectly implements interface 'IFoo': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: string) => number' is not assignable to type '(x: T) => T': -!!! Types of parameters 'x' and 'x' are incompatible: -!!! Type 'string' is not assignable to type 'T'. +!!! error TS2421: Class 'C' incorrectly implements interface 'IFoo': +!!! error TS2421: Types of property 'foo' are incompatible: +!!! error TS2421: Type '(x: string) => number' is not assignable to type '(x: T) => T': +!!! error TS2421: Types of parameters 'x' and 'x' are incompatible: +!!! error TS2421: Type 'string' is not assignable to type 'T'. foo(x: string): number { return null; } @@ -22,10 +22,10 @@ } class C2 implements IFoo2 { // error ~~ -!!! Class 'C2' incorrectly implements interface 'IFoo2': -!!! Types of property 'foo' are incompatible: -!!! Type '(x: Tstring) => number' is not assignable to type '(x: T) => T': -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': +!!! error TS2421: Types of property 'foo' are incompatible: +!!! error TS2421: Type '(x: Tstring) => number' is not assignable to type '(x: T) => T': +!!! error TS2421: Type 'number' is not assignable to type 'T'. foo(x: Tstring): number { return null; } diff --git a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt index 25ffa123d7..522b0623ee 100644 --- a/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt +++ b/tests/baselines/reference/implementPublicPropertyAsPrivate.errors.txt @@ -4,7 +4,7 @@ } class C implements I { ~ -!!! Class 'C' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'C' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x = 0; // should raise error at class decl } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt index 22cbf1aaca..494ab4da52 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates.errors.txt @@ -9,29 +9,29 @@ class Bar implements I { // error ~~~ -!!! Class 'Bar' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar'. +!!! error TS2421: Class 'Bar' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar'. } class Bar2 implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Property 'x' is missing in type 'Bar2'. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Property 'x' is missing in type 'Bar2'. y: number; } class Bar3 implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. x: string; y: number; } class Bar4 implements I { // error ~~~~ -!!! Class 'Bar4' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar4' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x: string; y: number; } \ No newline at end of file diff --git a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt index 7598e2b613..f95803f5fb 100644 --- a/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/implementingAnInterfaceExtendingClassWithPrivates2.errors.txt @@ -13,22 +13,22 @@ class Bar2 extends Foo implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x: string; y: number; } @@ -54,22 +54,22 @@ class Bar2 extends Foo implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Property 'z' is missing in type 'Bar2'. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Property 'z' is missing in type 'Bar2'. x: string; y: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Property 'z' is missing in type 'Bar3'. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Property 'z' is missing in type 'Bar3'. private x: string; y: number; } @@ -91,8 +91,8 @@ class Bar extends Foo implements I { // error ~~~ -!!! Class 'Bar' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar'. +!!! error TS2421: Class 'Bar' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar'. z: number; } @@ -100,29 +100,29 @@ var r1 = b.z; var r2 = b.x; // error ~~~ -!!! Property 'Foo.x' is inaccessible. +!!! error TS2341: Property 'Foo.x' is inaccessible. var r3 = b.y; // error ~ -!!! Property 'y' does not exist on type 'Bar'. +!!! error TS2339: Property 'y' does not exist on type 'Bar'. class Bar2 extends Foo implements I { // error ~~~~ -!!! Class 'Bar2' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar2' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar2' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar2'. +!!! error TS2421: Class 'Bar2' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar2'. x: string; z: number; } class Bar3 extends Foo implements I { // error ~~~~ -!!! Class 'Bar3' incorrectly extends base class 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'Bar3' incorrectly extends base class 'Foo': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~~~ -!!! Class 'Bar3' incorrectly implements interface 'I': -!!! Property 'y' is missing in type 'Bar3'. +!!! error TS2421: Class 'Bar3' incorrectly implements interface 'I': +!!! error TS2421: Property 'y' is missing in type 'Bar3'. private x: string; z: number; } diff --git a/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt b/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt index 020a061fa6..41824c1d71 100644 --- a/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt +++ b/tests/baselines/reference/implementsClauseAlreadySeen.errors.txt @@ -4,16 +4,16 @@ } class D implements C implements C { ~~~~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~ -!!! Cannot find name 'implements'. +!!! error TS2304: Cannot find name 'implements'. baz() { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~ -!!! Cannot find name 'baz'. +!!! error TS2304: Cannot find name 'baz'. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyAmbients.errors.txt b/tests/baselines/reference/implicitAnyAmbients.errors.txt index 99cd350286..f2b27e3a4a 100644 --- a/tests/baselines/reference/implicitAnyAmbients.errors.txt +++ b/tests/baselines/reference/implicitAnyAmbients.errors.txt @@ -3,43 +3,43 @@ declare module m { var x; // error ~ -!!! Variable 'x' implicitly has an 'any' type. +!!! error TS7005: Variable 'x' implicitly has an 'any' type. var y: any; function f(x); // error ~~~~~~~~~~~~~~ -!!! 'f', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. function f2(x: any); // error ~~~~~~~~~~~~~~~~~~~~ -!!! 'f2', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f2', which lacks return-type annotation, implicitly has an 'any' return type. function f3(x: any): any; interface I { foo(); // error ~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. foo2(x: any); // error ~~~~~~~~~~~~~ -!!! 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. foo3(x: any): any; } class C { foo(); // error ~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. foo2(x: any); // error ~~~~~~~~~~~~~ -!!! 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo2', which lacks return-type annotation, implicitly has an 'any' return type. foo3(x: any): any; } module n { var y; // error ~ -!!! Variable 'y' implicitly has an 'any' type. +!!! error TS7005: Variable 'y' implicitly has an 'any' type. } import m2 = n; diff --git a/tests/baselines/reference/implicitAnyCastedValue.errors.txt b/tests/baselines/reference/implicitAnyCastedValue.errors.txt index c0f887b04d..82e0bf5c94 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.errors.txt +++ b/tests/baselines/reference/implicitAnyCastedValue.errors.txt @@ -10,13 +10,13 @@ class C { bar = null; // this should be an error ~~~~~~~~~~~ -!!! Member 'bar' implicitly has an 'any' type. +!!! error TS7008: Member 'bar' implicitly has an 'any' type. foo = undefined; // this should be an error ~~~~~~~~~~~~~~~~ -!!! Member 'foo' implicitly has an 'any' type. +!!! error TS7008: Member 'foo' implicitly has an 'any' type. public get tempVar() { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; // this should not be an error } @@ -32,17 +32,17 @@ class C1 { getValue = null; // this should be an error ~~~~~~~~~~~~~~~~ -!!! Member 'getValue' implicitly has an 'any' type. +!!! error TS7008: Member 'getValue' implicitly has an 'any' type. public get castedGet() { ~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getValue; // this should not be an error } public get notCastedGet() { ~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getValue; // this should not be an error } } @@ -57,7 +57,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ -!!! 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. function returnTypeBar(): any { return null; // this should not be an error @@ -69,7 +69,7 @@ function multipleRets1(x) { // this should not be an error ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. if (x) { return 0; } @@ -80,7 +80,7 @@ function multipleRets2(x) { // this should not be an error ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. if (x) { return null; } diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt index db1e773c17..8b09b11bc6 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.errors.txt @@ -2,30 +2,30 @@ // these should be errors for implicit any parameter var lambda = (l1) => { }; // Error at "l1" ~~ -!!! Parameter 'l1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'l1' implicitly has an 'any' type. var lambd2 = (ll1, ll2: string) => { } // Error at "ll1" ~~~ -!!! Parameter 'll1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'll1' implicitly has an 'any' type. var lamda3 = function myLambda3(myParam) { } ~~~~~~~ -!!! Parameter 'myParam' implicitly has an 'any' type. +!!! error TS7006: Parameter 'myParam' implicitly has an 'any' type. var lamda4 = () => { return null }; ~~~~~~~~~~~~~~~~~~~~~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. // these should be error for implicit any return type var lambda5 = function temp() { return null; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. var lambda6 = () => { return null; } ~~~~~~~~~~~~~~~~~~~~~~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. var lambda7 = function temp() { return undefined; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'temp', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'temp', which lacks return-type annotation, implicitly has an 'any' return type. var lambda8 = () => { return undefined; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. // this shouldn't be an error var lambda9 = () => { return 5; } diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt index dffd6dac81..cf2dd2486d 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.errors.txt @@ -2,25 +2,25 @@ // these should be errors function foo(x) { }; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. function bar(x: number, y) { }; // error at "y"; no error at "x" ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. function func2(a, b, c) { }; // error at "a,b,c" ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. ~ -!!! Parameter 'b' implicitly has an 'any' type. +!!! error TS7006: Parameter 'b' implicitly has an 'any' type. ~ -!!! Parameter 'c' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c' implicitly has an 'any' type. function func3(...args) { }; // error at "args" ~~~~~~~ -!!! Rest parameter 'args' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'args' implicitly has an 'any[]' type. function func4(z= null, w= undefined) { }; // error at "z,w" ~~~~~~~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. ~~~~~~~~~~~~ -!!! Parameter 'w' implicitly has an 'any' type. +!!! error TS7006: Parameter 'w' implicitly has an 'any' type. // these shouldn't be errors function noError1(x= 3, y= 2) { }; diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt index a6ed50b77f..03d14d7a84 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType.errors.txt @@ -3,24 +3,24 @@ interface IFace { member1; // error at "member1" ~~~~~~~~ -!!! Member 'member1' implicitly has an 'any' type. +!!! error TS7008: Member 'member1' implicitly has an 'any' type. member2: string; constructor(c1, c2: string, c3); // error at "c1, c3, "constructor" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'constructor', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'constructor', which lacks return-type annotation, implicitly has an 'any' return type. ~~ -!!! Parameter 'c1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c1' implicitly has an 'any' type. ~~ -!!! Parameter 'c3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c3' implicitly has an 'any' type. funcOfIFace(f1, f2, f3: number); // error at "f1, f2, funcOfIFace" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. ~~ -!!! Parameter 'f1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f1' implicitly has an 'any' type. ~~ -!!! Parameter 'f2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f2' implicitly has an 'any' type. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt index c98f3d3c31..9c3874bd60 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.errors.txt @@ -3,18 +3,18 @@ class C { public x = null;// error at "x" ~~~~~~~~~~~~~~~~ -!!! Member 'x' implicitly has an 'any' type. +!!! error TS7008: Member 'x' implicitly has an 'any' type. public x1: string // no error constructor(c1, c2, c3: string) { } // error at "c1, c2" ~~ -!!! Parameter 'c1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c1' implicitly has an 'any' type. ~~ -!!! Parameter 'c2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'c2' implicitly has an 'any' type. funcOfC(f1, f2, f3: number) { } // error at "f1,f2" ~~ -!!! Parameter 'f1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f1' implicitly has an 'any' type. ~~ -!!! Parameter 'f2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'f2' implicitly has an 'any' type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt b/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt index 9d1fa68e50..7139729c61 100644 --- a/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareTypePropertyWithoutType.errors.txt @@ -6,21 +6,21 @@ // this should be an error var x: { y; z; } // error at "y,z" ~~ -!!! Member 'y' implicitly has an 'any' type. +!!! error TS7008: Member 'y' implicitly has an 'any' type. ~~ -!!! Member 'z' implicitly has an 'any' type. +!!! error TS7008: Member 'z' implicitly has an 'any' type. var x1: { y1: C; z1; }; // error at "z1" ~~~ -!!! Member 'z1' implicitly has an 'any' type. +!!! error TS7008: Member 'z1' implicitly has an 'any' type. var x11: { new (); }; // error at "new" ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. var x2: (y2) => number; // error at "y2" ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. var x3: (x3: string, y3) => void ; // error at "y3" ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // this should not be an error var bar: { a: number; b: number }; diff --git a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt index 57e74c34a3..91781ef548 100644 --- a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt +++ b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.errors.txt @@ -2,13 +2,13 @@ // this should be an error var x; // error at "x" ~ -!!! Variable 'x' implicitly has an 'any' type. +!!! error TS7005: Variable 'x' implicitly has an 'any' type. declare var foo; // error at "foo" ~~~ -!!! Variable 'foo' implicitly has an 'any' type. +!!! error TS7005: Variable 'foo' implicitly has an 'any' type. function func(k) { }; //error at "k" ~ -!!! Parameter 'k' implicitly has an 'any' type. +!!! error TS7006: Parameter 'k' implicitly has an 'any' type. func(x); // this shouldn't be an error diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt index cf135dbbd4..803e001688 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.errors.txt @@ -2,27 +2,27 @@ // this should be errors var arg0 = null; // error at "arg0" ~~~~ -!!! Variable 'arg0' implicitly has an 'any' type. +!!! error TS7005: Variable 'arg0' implicitly has an 'any' type. var anyArray = [null, undefined]; // error at array literal ~~~~~~~~ -!!! Variable 'anyArray' implicitly has an 'any[]' type. +!!! error TS7005: Variable 'anyArray' implicitly has an 'any[]' type. var objL: { v; w; } // error at "y,z" ~~ -!!! Member 'v' implicitly has an 'any' type. +!!! error TS7008: Member 'v' implicitly has an 'any' type. ~~ -!!! Member 'w' implicitly has an 'any' type. +!!! error TS7008: Member 'w' implicitly has an 'any' type. var funcL: (y2) => number; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function temp1(arg1) { } // error at "temp1" ~~~~ -!!! Parameter 'arg1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'arg1' implicitly has an 'any' type. function testFunctionExprC(subReplace: (s: string, ...arg: any[]) => string) { } function testFunctionExprC2(eq: (v1: any, v2: any) => number) { }; function testObjLiteral(objLit: { v: any; w: any }) { }; function testFuncLiteral(funcLit: (y2) => number) { }; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. // this should not be an error testFunctionExprC2((v1, v2) => 1); diff --git a/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt b/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt index 6ef65b09ed..0302ae05f6 100644 --- a/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt +++ b/tests/baselines/reference/implicitAnyFunctionOverloadWithImplicitAnyReturnType.errors.txt @@ -3,7 +3,7 @@ interface IFace { funcOfIFace(); // error at "f" ~~~~~~~~~~~~~~ -!!! 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'funcOfIFace', which lacks return-type annotation, implicitly has an 'any' return type. } // this should not be an error diff --git a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt index 5c8ab6e19a..904d47adb3 100644 --- a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt +++ b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.errors.txt @@ -2,10 +2,10 @@ // this should be an error function nullWidenFunction() { return null;} // error at "nullWidenFunction" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'nullWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. function undefinedWidenFunction() { return undefined; } // error at "undefinedWidenFunction" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'undefinedWidenFunction', which lacks return-type annotation, implicitly has an 'any' return type. class C { nullWidenFuncOfC() { // error at "nullWidenFuncOfC" @@ -14,7 +14,7 @@ ~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'nullWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'nullWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. underfinedWidenFuncOfC() { // error at "underfinedWidenFuncOfC" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -22,7 +22,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'underfinedWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'underfinedWidenFuncOfC', which lacks return-type annotation, implicitly has an 'any' return type. } // this should not be an error diff --git a/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt b/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt index 3f95e27ab0..899d587aac 100644 --- a/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt +++ b/tests/baselines/reference/implicitAnyGenericTypeInference.errors.txt @@ -7,7 +7,7 @@ var c: Comparer; c = { compareTo: (x, y) => { return y; } }; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. var r = c.compareTo(1, ''); \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt index c348420259..784234c539 100644 --- a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt +++ b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt @@ -3,17 +3,17 @@ class GetAndSet { getAndSet = null; // error at "getAndSet" ~~~~~~~~~~~~~~~~~ -!!! Member 'getAndSet' implicitly has an 'any' type. +!!! error TS7008: Member 'getAndSet' implicitly has an 'any' type. public get haveGetAndSet() { // this should not be an error ~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getAndSet; } // this shouldn't be an error public set haveGetAndSet(value) { // error at "value" ~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.getAndSet = value; } } @@ -21,23 +21,23 @@ class SetterOnly { public set haveOnlySet(newXValue) { // error at "haveOnlySet, newXValue" ~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ -!!! Parameter 'newXValue' implicitly has an 'any' type. +!!! error TS7006: Parameter 'newXValue' implicitly has an 'any' type. } ~~~~~ -!!! Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation. +!!! error TS7016: Property 'haveOnlySet' implicitly has type 'any', because its 'set' accessor lacks a type annotation. } class GetterOnly { public get haveOnlyGet() { // error at "haveOnlyGet" ~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return null; ~~~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt b/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt index 16ee2425d4..41e8c2cb1f 100644 --- a/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt +++ b/tests/baselines/reference/implicitAnyInAmbientDeclaration.errors.txt @@ -3,17 +3,17 @@ declare class C { public publicMember; // this should be an error ~~~~~~~~~~~~~~~~~~~~ -!!! Member 'publicMember' implicitly has an 'any' type. +!!! error TS7008: Member 'publicMember' implicitly has an 'any' type. private privateMember; // this should not be an error public publicFunction(x); // this should be an error ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. private privateFunction(privateParam); // this should not be an error private constructor(privateParam); ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt b/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt index c65b2e4934..68b6a1115d 100644 --- a/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt +++ b/tests/baselines/reference/implicitAnyInAmbientDeclaration2.d.errors.txt @@ -1,31 +1,31 @@ ==== tests/cases/compiler/implicitAnyInAmbientDeclaration2.d.ts (8 errors) ==== declare function foo(x); // this should be an error ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. declare var bar; // this should be be an erro ~~~ -!!! Variable 'bar' implicitly has an 'any' type. +!!! error TS7005: Variable 'bar' implicitly has an 'any' type. declare class C { public publicMember; // this should be an error ~~~~~~~~~~~~~~~~~~~~ -!!! Member 'publicMember' implicitly has an 'any' type. +!!! error TS7008: Member 'publicMember' implicitly has an 'any' type. private privateMember; // this should not be an error public publicFunction(x); // this should be an error ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'publicFunction', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. private privateFunction(privateParam); // this should not be an error private constructor(privateParam); // this should not be an error ~~~~~~~ -!!! 'private' modifier cannot appear on a constructor declaration. +!!! error TS1089: 'private' modifier cannot appear on a constructor declaration. } declare class D { public constructor(publicConsParam, int: number); // this should be an error ~~~~~~~~~~~~~~~ -!!! Parameter 'publicConsParam' implicitly has an 'any' type. +!!! error TS7006: Parameter 'publicConsParam' implicitly has an 'any' type. } \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt index d78cf0d5b4..26dc29601c 100644 --- a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt +++ b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.errors.txt @@ -2,4 +2,4 @@ function Point() { this.x = 3; } var x: any = new Point(); // error at "new" ~~~~~~~~~~~ -!!! 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/implicitAnyWidenToAny.errors.txt b/tests/baselines/reference/implicitAnyWidenToAny.errors.txt index b9e5cbf1a1..d09eb706f6 100644 --- a/tests/baselines/reference/implicitAnyWidenToAny.errors.txt +++ b/tests/baselines/reference/implicitAnyWidenToAny.errors.txt @@ -2,16 +2,16 @@ // these should be errors var x = null; // error at "x" ~ -!!! Variable 'x' implicitly has an 'any' type. +!!! error TS7005: Variable 'x' implicitly has an 'any' type. var x1 = undefined; // error at "x1" ~~ -!!! Variable 'x1' implicitly has an 'any' type. +!!! error TS7005: Variable 'x1' implicitly has an 'any' type. var widenArray = [null, undefined]; // error at "widenArray" ~~~~~~~~~~ -!!! Variable 'widenArray' implicitly has an 'any[]' type. +!!! error TS7005: Variable 'widenArray' implicitly has an 'any[]' type. var emptyArray = []; // error at "emptyArray" ~~~~~~~~~~ -!!! Variable 'emptyArray' implicitly has an 'any[]' type. +!!! error TS7005: Variable 'emptyArray' implicitly has an 'any[]' type. // these should not be error class AnimalObj { diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt index 3960281c7d..8b311bd239 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.errors.txt @@ -9,7 +9,7 @@ ==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts (1 errors) ==== export module m { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export function foo() { } } \ No newline at end of file diff --git a/tests/baselines/reference/importAnImport.errors.txt b/tests/baselines/reference/importAnImport.errors.txt index 147b856685..cb30b1e738 100644 --- a/tests/baselines/reference/importAnImport.errors.txt +++ b/tests/baselines/reference/importAnImport.errors.txt @@ -6,5 +6,5 @@ module m0 { import m8 = c.a.b.ma; ~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'c.a.b' has no exported member 'ma'. +!!! error TS2305: Module 'c.a.b' has no exported member 'ma'. } \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt index faf8a4bfe7..47db67522a 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt @@ -5,6 +5,6 @@ import x = m.m; ~~~~~~~~~~~~~~~ -!!! Import declaration conflicts with local declaration of 'x' +!!! error TS2440: Import declaration conflicts with local declaration of 'x' var x = ''; \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt index 53ec5b64fa..277b50b488 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict3.errors.txt @@ -6,5 +6,5 @@ import x = m.m; import x = m.m; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt index edef13b1a2..d2ce983a82 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt @@ -6,5 +6,5 @@ var x = ''; import x = m.m; ~~~~~~~~~~~~~~~ -!!! Import declaration conflicts with local declaration of 'x' +!!! error TS2440: Import declaration conflicts with local declaration of 'x' \ No newline at end of file diff --git a/tests/baselines/reference/importAsBaseClass.errors.txt b/tests/baselines/reference/importAsBaseClass.errors.txt index e9cd8590cb..189087804d 100644 --- a/tests/baselines/reference/importAsBaseClass.errors.txt +++ b/tests/baselines/reference/importAsBaseClass.errors.txt @@ -2,7 +2,7 @@ import Greeter = require("importAsBaseClass_0"); class Hello extends Greeter { } ~~~~~~~ -!!! Cannot find name 'Greeter'. +!!! error TS2304: Cannot find name 'Greeter'. ==== tests/cases/compiler/importAsBaseClass_0.ts (0 errors) ==== export class Greeter { diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt index 9cb444661b..ec5bc18b94 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.errors.txt @@ -1,14 +1,14 @@ ==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (4 errors) ==== import b = require("externalModule"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~~~~~~~~~~~ -!!! Cannot find external module 'externalModule'. +!!! error TS2307: Cannot find external module 'externalModule'. declare module "m1" { ~~~~ -!!! Ambient external modules cannot be nested in other modules. +!!! error TS2435: Ambient external modules cannot be nested in other modules. import im2 = require("externalModule"); ~~~~~~~~~~~~~~~~ -!!! Cannot find external module 'externalModule'. +!!! error TS2307: Cannot find external module 'externalModule'. } \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithClassModifiers.errors.txt b/tests/baselines/reference/importDeclWithClassModifiers.errors.txt index 081bebda44..9e77e7f20f 100644 --- a/tests/baselines/reference/importDeclWithClassModifiers.errors.txt +++ b/tests/baselines/reference/importDeclWithClassModifiers.errors.txt @@ -5,18 +5,18 @@ } export public import a = x.c; ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. export private import b = x.c; ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. export static import c = x.c; ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt index 972a1b9cc7..29075f7ebe 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt +++ b/tests/baselines/reference/importDeclWithDeclareModifier.errors.txt @@ -5,12 +5,12 @@ } declare export import a = x.c; ~~~~~~~ -!!! A 'declare' modifier cannot be used with an import declaration. +!!! error TS1079: A 'declare' modifier cannot be used with an import declaration. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. ~~~~~~ -!!! 'export' modifier must precede 'declare' modifier. +!!! error TS1029: 'export' modifier must precede 'declare' modifier. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt b/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt index 38c3d97185..648497a246 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt +++ b/tests/baselines/reference/importDeclWithDeclareModifierInAmbientContext.errors.txt @@ -6,11 +6,11 @@ } declare export import a = x.c; ~~~~~~~ -!!! A 'declare' modifier cannot be used in an already ambient context. +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~~~~~ -!!! A 'declare' modifier cannot be used with an import declaration. +!!! error TS1079: A 'declare' modifier cannot be used with an import declaration. ~~~~~~ -!!! 'export' modifier must precede 'declare' modifier. +!!! error TS1029: 'export' modifier must precede 'declare' modifier. var b: a; } \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifier.errors.txt b/tests/baselines/reference/importDeclWithExportModifier.errors.txt index ffa48b8a52..249c331c3b 100644 --- a/tests/baselines/reference/importDeclWithExportModifier.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifier.errors.txt @@ -5,6 +5,6 @@ } export import a = x.c; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. var b: a; \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt index 9c66bc3ca4..7aac3ee75a 100644 --- a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.errors.txt @@ -5,7 +5,7 @@ } export import a = x.c; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Module 'x' has no exported member 'c'. +!!! error TS2305: Module 'x' has no exported member 'c'. export = x; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. \ No newline at end of file +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. \ No newline at end of file diff --git a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt index 5dc48436ad..d6e915adda 100644 --- a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt +++ b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt @@ -7,5 +7,5 @@ export import a = x.c; export = x; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/importInsideModule.errors.txt b/tests/baselines/reference/importInsideModule.errors.txt index 38f09c07cf..1790bf7692 100644 --- a/tests/baselines/reference/importInsideModule.errors.txt +++ b/tests/baselines/reference/importInsideModule.errors.txt @@ -2,9 +2,9 @@ export module myModule { import foo = require("importInsideModule_file1"); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Import declarations in an internal module cannot reference an external module. +!!! error TS1147: Import declarations in an internal module cannot reference an external module. ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot find external module 'importInsideModule_file1'. +!!! error TS2307: Cannot find external module 'importInsideModule_file1'. var a = foo.x; } ==== tests/cases/compiler/importInsideModule_file1.ts (0 errors) ==== diff --git a/tests/baselines/reference/importNonExternalModule.errors.txt b/tests/baselines/reference/importNonExternalModule.errors.txt index 6abcf7ac44..d6a2d8b384 100644 --- a/tests/baselines/reference/importNonExternalModule.errors.txt +++ b/tests/baselines/reference/importNonExternalModule.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require("./foo_0"); ~~~~~~~~~ -!!! File 'foo_0.ts' is not an external module. +!!! error TS2306: File 'foo_0.ts' is not an external module. // Import should fail. foo_0 not an external module if(foo.answer === 42){ diff --git a/tests/baselines/reference/importNonStringLiteral.errors.txt b/tests/baselines/reference/importNonStringLiteral.errors.txt index 0c1c2fde04..9c985a5442 100644 --- a/tests/baselines/reference/importNonStringLiteral.errors.txt +++ b/tests/baselines/reference/importNonStringLiteral.errors.txt @@ -2,7 +2,7 @@ var x = "filename"; import foo = require(x); // invalid ~ -!!! String literal expected. +!!! error TS1141: String literal expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/importStatementsInterfaces.errors.txt b/tests/baselines/reference/importStatementsInterfaces.errors.txt index 95a733dc2c..2c1179bbd5 100644 --- a/tests/baselines/reference/importStatementsInterfaces.errors.txt +++ b/tests/baselines/reference/importStatementsInterfaces.errors.txt @@ -23,7 +23,7 @@ import b = a.inA; var m: typeof a; ~ -!!! Cannot find name 'a'. +!!! error TS2304: Cannot find name 'a'. var p: b.Point3D; var p = {x:0, y:0, z: 0 }; } diff --git a/tests/baselines/reference/importTsBeforeDTs.errors.txt b/tests/baselines/reference/importTsBeforeDTs.errors.txt index 58e7263457..a67603cbf2 100644 --- a/tests/baselines/reference/importTsBeforeDTs.errors.txt +++ b/tests/baselines/reference/importTsBeforeDTs.errors.txt @@ -2,7 +2,7 @@ import foo = require("./foo_0"); var z1 = foo.x + 10; // Should error, as .ts preferred over .d.ts ~ -!!! Property 'x' does not exist on type 'typeof "tests/cases/conformance/externalModules/foo_0"'. +!!! error TS2339: Property 'x' does not exist on type 'typeof "tests/cases/conformance/externalModules/foo_0"'. var z2 = foo.y + 10; // Should resolve ==== tests/cases/conformance/externalModules/foo_0.d.ts (0 errors) ==== diff --git a/tests/baselines/reference/importedModuleAddToGlobal.errors.txt b/tests/baselines/reference/importedModuleAddToGlobal.errors.txt index d6989e5b3b..0a7c8501c2 100644 --- a/tests/baselines/reference/importedModuleAddToGlobal.errors.txt +++ b/tests/baselines/reference/importedModuleAddToGlobal.errors.txt @@ -15,5 +15,5 @@ import a = A; function hello(): b.B { return null; } ~~~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. } \ No newline at end of file diff --git a/tests/baselines/reference/inOperator.errors.txt b/tests/baselines/reference/inOperator.errors.txt index 83f11b759e..e9c5adb4c7 100644 --- a/tests/baselines/reference/inOperator.errors.txt +++ b/tests/baselines/reference/inOperator.errors.txt @@ -7,7 +7,7 @@ var b = '' in 0; ~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var c: any; var y: number; diff --git a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt index cb65a41200..7745e27183 100644 --- a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt @@ -12,31 +12,31 @@ var ra1 = a1 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra2 = a2 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra3 = a3 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra4 = a4 in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra5 = null in x; ~~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra6 = undefined in x; ~~~~~~~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra7 = E.a in x; ~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra8 = false in x; ~~~~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. var ra9 = {} in x; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. // invalid right operands // the right operand is required to be of type Any, an object type, or a type parameter type @@ -47,35 +47,35 @@ var rb1 = x in b1; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb2 = x in b2; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb3 = x in b3; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb4 = x in b4; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb5 = x in 0; ~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb6 = x in false; ~~~~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb7 = x in ''; ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb8 = x in null; ~~~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter var rb9 = x in undefined; ~~~~~~~~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter // both operands are invalid var rc1 = {} in ''; ~~ -!!! The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. +!!! error TS2360: The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'. ~~ -!!! The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter \ No newline at end of file +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleExports1.errors.txt b/tests/baselines/reference/incompatibleExports1.errors.txt index 99a35e122b..d4b5502a24 100644 --- a/tests/baselines/reference/incompatibleExports1.errors.txt +++ b/tests/baselines/reference/incompatibleExports1.errors.txt @@ -4,7 +4,7 @@ interface y { a: Date } export = y; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } declare module "baz" { @@ -18,6 +18,6 @@ export = c; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleExports2.errors.txt b/tests/baselines/reference/incompatibleExports2.errors.txt index a809d70feb..ab78deae29 100644 --- a/tests/baselines/reference/incompatibleExports2.errors.txt +++ b/tests/baselines/reference/incompatibleExports2.errors.txt @@ -4,5 +4,5 @@ interface y { a: Date } export = y; ~~~~~~~~~~~ -!!! An export assignment cannot be used in a module with other exported elements. +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. } \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleGenericTypes.errors.txt b/tests/baselines/reference/incompatibleGenericTypes.errors.txt index 5dca84027d..1aa251ed02 100644 --- a/tests/baselines/reference/incompatibleGenericTypes.errors.txt +++ b/tests/baselines/reference/incompatibleGenericTypes.errors.txt @@ -10,5 +10,5 @@ var v2: I1 = v1; ~~ -!!! Type 'I1' is not assignable to type 'I1': -!!! Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'I1' is not assignable to type 'I1': +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index bac9dbabf1..a73b6a0178 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -5,10 +5,10 @@ class C1 implements IFoo1 { // incompatible on the return type ~~ -!!! Class 'C1' incorrectly implements interface 'IFoo1': -!!! Types of property 'p1' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'IFoo1': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type '() => string' is not assignable to type '() => number': +!!! error TS2421: Type 'string' is not assignable to type 'number'. public p1() { return "s"; } @@ -20,11 +20,11 @@ class C2 implements IFoo2 { // incompatible on the param type ~~ -!!! Class 'C2' incorrectly implements interface 'IFoo2': -!!! Types of property 'p1' are incompatible: -!!! Type '(n: number) => number' is not assignable to type '(s: string) => number': -!!! Types of parameters 'n' and 's' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'IFoo2': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type '(n: number) => number' is not assignable to type '(s: string) => number': +!!! error TS2421: Types of parameters 'n' and 's' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public p1(n:number) { return 0; } @@ -36,9 +36,9 @@ class C3 implements IFoo3 { // incompatible on the property type ~~ -!!! Class 'C3' incorrectly implements interface 'IFoo3': -!!! Types of property 'p1' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'IFoo3': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public p1: number; } @@ -48,10 +48,10 @@ class C4 implements IFoo4 { // incompatible on the property type ~~ -!!! Class 'C4' incorrectly implements interface 'IFoo4': -!!! Types of property 'p1' are incompatible: -!!! Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }': -!!! Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. +!!! error TS2421: Class 'C4' incorrectly implements interface 'IFoo4': +!!! error TS2421: Types of property 'p1' are incompatible: +!!! error TS2421: Type '{ c: { b: string; }; d: string; }' is not assignable to type '{ a: { a: string; }; b: string; }': +!!! error TS2421: Property 'a' is missing in type '{ c: { b: string; }; d: string; }'. public p1: { c: { b: string; }; d: string; }; } @@ -62,7 +62,7 @@ var c2: C2; if1(c1); ~~ -!!! Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. +!!! error TS2345: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. function of1(n: { a: { a: string; }; b: string; }): number; @@ -71,8 +71,8 @@ of1({ e: 0, f: 0 }); ~~~~~~~~~~~~~~ -!!! Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. -!!! Property 'c' is missing in type '{ e: number; f: number; }'. +!!! error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. +!!! error TS2345: Property 'c' is missing in type '{ e: number; f: number; }'. interface IMap { [key:string]:string; @@ -91,8 +91,8 @@ var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 }; ~~ -!!! Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }': -!!! Property 'a' is missing in type '{ e: number; f: number; }'. +!!! error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }': +!!! error TS2322: Property 'a' is missing in type '{ e: number; f: number; }'. var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; @@ -100,9 +100,9 @@ var i1c1: { (): string; } = 5; ~~~~ -!!! Type 'number' is not assignable to type '() => string'. +!!! error TS2323: Type 'number' is not assignable to type '() => string'. var fp1: () =>any = a => 0; ~~~ -!!! Type '(a: any) => number' is not assignable to type '() => any'. +!!! error TS2323: Type '(a: any) => number' is not assignable to type '() => any'. \ No newline at end of file diff --git a/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt b/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt index f54412d13d..a8c8f5ab10 100644 --- a/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt +++ b/tests/baselines/reference/incompleteDottedExpressionAtEOF.errors.txt @@ -2,6 +2,6 @@ // used to leak __missing into error message var p2 = window. -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~~~~~~ -!!! Cannot find name 'window'. \ No newline at end of file +!!! error TS2304: Cannot find name 'window'. \ No newline at end of file diff --git a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt index 60bebb7036..4d96a454f2 100644 --- a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt +++ b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/incompleteObjectLiteral1.ts (2 errors) ==== var tt = { aa; } ~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var x = tt; \ No newline at end of file diff --git a/tests/baselines/reference/incorrectClassOverloadChain.errors.txt b/tests/baselines/reference/incorrectClassOverloadChain.errors.txt index c6a4361b56..5a17a5014e 100644 --- a/tests/baselines/reference/incorrectClassOverloadChain.errors.txt +++ b/tests/baselines/reference/incorrectClassOverloadChain.errors.txt @@ -3,6 +3,6 @@ foo(): string; foo(x): number; ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. x = 1; } \ No newline at end of file diff --git a/tests/baselines/reference/incrementAndDecrement.errors.txt b/tests/baselines/reference/incrementAndDecrement.errors.txt index b8dc8c5b4e..df87895ba4 100644 --- a/tests/baselines/reference/incrementAndDecrement.errors.txt +++ b/tests/baselines/reference/incrementAndDecrement.errors.txt @@ -5,27 +5,27 @@ var a: any; var w = window; ~~~~~~ -!!! Cannot find name 'window'. +!!! error TS2304: Cannot find name 'window'. // Assign to expression++ x++ = 4; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Assign to expression-- x-- = 5; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Assign to++expression ++x = 4; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Assign to--expression --x = 5; // Error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. // Pre and postfix++ on number x++; @@ -34,16 +34,16 @@ --x; ++x++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --x--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++x--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --x++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // Pre and postfix++ on enum e++; @@ -52,16 +52,16 @@ --e; ++e++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --e--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++e--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --e++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // Pre and postfix++ on value of type 'any' a++; @@ -70,16 +70,16 @@ --a; ++a++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --a--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++a--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --a++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // Pre and postfix++ on other types @@ -89,16 +89,16 @@ --w; // Error ++w++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --w--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++w--; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. --w++; // Error ~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOnTypeParameter.errors.txt b/tests/baselines/reference/incrementOnTypeParameter.errors.txt index b9461c690e..2482ecba4e 100644 --- a/tests/baselines/reference/incrementOnTypeParameter.errors.txt +++ b/tests/baselines/reference/incrementOnTypeParameter.errors.txt @@ -4,10 +4,10 @@ foo() { this.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. for (var i: T, j = 0; j < 10; i++) { ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. } } } diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index 6ebcb4490e..e4e750bdb1 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -24,131 +24,131 @@ // any type var var ResultIsNumber1 = ++ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = ++A; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = ++M; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ++obj; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = ++obj1; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = ANY2++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = A++; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = M++; ~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = obj++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = obj1++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type literal var ResultIsNumber11 = ++{}; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = ++null; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = ++undefined; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = null++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = {}++; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = undefined++; ~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // any type expressions var ResultIsNumber17 = ++foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber18 = ++A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber19 = ++(null + undefined); ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber20 = ++(null + null); ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber21 = ++(undefined + undefined); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber22 = ++obj1.x; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber23 = ++obj1.y; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber24 = foo()++; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber25 = A.foo()++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber26 = (null + undefined)++; ~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber27 = (null + null)++; ~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var ResultIsNumber28 = (undefined + undefined)++; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var ResultIsNumber29 = obj1.x++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber30 = obj1.y++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators ++ANY2; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ANY2++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++ANY1++; ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY2++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++ANY2[0]++; ~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt index f226242381..9dfe3a35bc 100644 --- a/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithEnumTypeInvalidOperations.errors.txt @@ -7,37 +7,37 @@ // enum type var var ResultIsNumber1 = ++ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = ++ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = ENUM++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ENUM1++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // enum type expressions var ResultIsNumber5 = ++(ENUM[1] + ENUM[2]); ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = (ENUM[1] + ENUM[2])++; ~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operator ++ENUM; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++ENUM1; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ENUM1++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt index be0ea1d149..eb43167c83 100644 --- a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.errors.txt @@ -18,70 +18,70 @@ //number type var var ResultIsNumber1 = ++NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = NUMBER1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type literal var ResultIsNumber3 = ++1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber4 = ++{ x: 1, y: 2}; ~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = ++{ x: 1, y: (n: number) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = 1++; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber7 = { x: 1, y: 2 }++; ~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: 1, y: (n: number) => { return n; } }++; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // number type expressions var ResultIsNumber9 = ++foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber10 = ++A.foo(); ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber11 = ++(NUMBER + NUMBER); ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber12 = foo()++; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber13 = A.foo()++; ~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. var ResultIsNumber14 = (NUMBER + NUMBER)++; ~~~~~~~~~~~~~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. // miss assignment operator ++1; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. ++NUMBER1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++foo(); ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. 1++; ~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. NUMBER1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()++; ~~~~~ -!!! The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file +!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt index ff51aac9af..c97bd54328 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.errors.txt @@ -17,97 +17,97 @@ // boolean type var var ResultIsNumber1 = ++BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = BOOLEAN++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type literal var ResultIsNumber3 = ++true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = ++{ x: true, y: false }; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber5 = ++{ x: true, y: (n: boolean) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = true++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = { x: true, y: false }++; ~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = { x: true, y: (n: boolean) => { return n; } }++; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // boolean type expressions var ResultIsNumber9 = ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber11 = ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = ++A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = A.foo()++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators ++true; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++BOOLEAN; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. true++; ~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. BOOLEAN++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++, M.n++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt index 3449108faa..3c2c2c8fd9 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.errors.txt @@ -18,127 +18,127 @@ // string type var var ResultIsNumber1 = ++STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber2 = ++STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber3 = STRING++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber4 = STRING1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type literal var ResultIsNumber5 = ++""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber6 = ++{ x: "", y: "" }; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber7 = ++{ x: "", y: (s: string) => { return s; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber8 = ""++; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber9 = { x: "", y: "" }++; ~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber10 = { x: "", y: (s: string) => { return s; } }++; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // string type expressions var ResultIsNumber11 = ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber12 = ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber13 = ++STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber14 = ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber15 = ++A.foo(); ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber16 = ++(STRING + STRING); ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber17 = objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber18 = M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber19 = STRING1[0]++; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber20 = foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber21 = A.foo()++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. var ResultIsNumber22 = (STRING + STRING)++; ~~~~~~~~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. // miss assignment operators ++""; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++STRING; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++STRING1; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++STRING1[0]; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++foo(); ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++M.n; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++objA.a, M.n; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ""++; ~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1++; ~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. STRING1[0]++; ~~~~~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. foo()++; ~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. M.n++; ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. objA.a++, M.n++; ~~~~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ~~~ -!!! An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/indexIntoArraySubclass.errors.txt b/tests/baselines/reference/indexIntoArraySubclass.errors.txt index 83919640f7..8539552458 100644 --- a/tests/baselines/reference/indexIntoArraySubclass.errors.txt +++ b/tests/baselines/reference/indexIntoArraySubclass.errors.txt @@ -4,4 +4,4 @@ var r = x2[0]; // string r = 0; //error ~ -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt b/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt index d0aec71ef1..51b44262c1 100644 --- a/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt +++ b/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt @@ -2,21 +2,21 @@ interface I { [x]: string; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [x: string]; ~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. } class C { [x]: string ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. } class C2 { [x: string] ~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureTypeCheck.errors.txt b/tests/baselines/reference/indexSignatureTypeCheck.errors.txt index 0c808feecb..8e592972fc 100644 --- a/tests/baselines/reference/indexSignatureTypeCheck.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeCheck.errors.txt @@ -14,14 +14,14 @@ interface indexErrors { [p2?: string]; ~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. [...p3: any[]]; ~~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. [p4: string, p5?: string]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. [p6: string, ...p7: any[]]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt b/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt index 88a004e0b3..28b8865f00 100644 --- a/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeCheck2.errors.txt @@ -10,14 +10,14 @@ interface indexErrors { [p2?: string]; ~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. [...p3: any[]]; ~~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. [p4: string, p5?: string]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. [p6: string, ...p7: any[]]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureTypeInference.errors.txt b/tests/baselines/reference/indexSignatureTypeInference.errors.txt index ee42069a4e..aeba7e0815 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeInference.errors.txt @@ -18,6 +18,6 @@ var v1 = numberMapToArray(stringMap); // Ok var v1 = stringMapToArray(numberMap); // Error expected here ~~~~~~~~~ -!!! Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap<{}>'. +!!! error TS2345: Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap<{}>'. var v1 = stringMapToArray(stringMap); // Ok \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt b/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt index 0b857a8df0..d249e4c7f0 100644 --- a/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt +++ b/tests/baselines/reference/indexSignatureWithAccessibilityModifier.errors.txt @@ -2,15 +2,15 @@ interface I { [public x: string]: string; ~ -!!! An index signature parameter cannot have an accessibility modifier. +!!! error TS1018: An index signature parameter cannot have an accessibility modifier. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } class C { [public x: string]: string ~ -!!! An index signature parameter cannot have an accessibility modifier. +!!! error TS1018: An index signature parameter cannot have an accessibility modifier. ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexSignatureWithInitializer.errors.txt b/tests/baselines/reference/indexSignatureWithInitializer.errors.txt index c82a2103e6..2e6b0341e9 100644 --- a/tests/baselines/reference/indexSignatureWithInitializer.errors.txt +++ b/tests/baselines/reference/indexSignatureWithInitializer.errors.txt @@ -2,15 +2,15 @@ interface I { [x = '']: string; ~ -!!! An index signature parameter cannot have an initializer. +!!! error TS1020: An index signature parameter cannot have an initializer. ~~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } class C { [x = 0]: string ~ -!!! An index signature parameter cannot have an initializer. +!!! error TS1020: An index signature parameter cannot have an initializer. ~~~~~ -!!! A parameter initializer is only allowed in a function or constructor implementation. +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexTypeCheck.errors.txt b/tests/baselines/reference/indexTypeCheck.errors.txt index d5a9fab9d6..c4e04932b2 100644 --- a/tests/baselines/reference/indexTypeCheck.errors.txt +++ b/tests/baselines/reference/indexTypeCheck.errors.txt @@ -2,10 +2,10 @@ interface Red { [n:number]; // ok ~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [s:string]; // ok ~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. } interface Blue { @@ -21,34 +21,34 @@ interface Orange { [n:number]: number; // ok ~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'number' is not assignable to string index type 'string'. +!!! error TS2413: Numeric index type 'number' is not assignable to string index type 'string'. [s:string]: string; // error } interface Green { [n:number]: Orange; // error ~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'Orange' is not assignable to string index type 'Yellow'. +!!! error TS2413: Numeric index type 'Orange' is not assignable to string index type 'Yellow'. [s:string]: Yellow; // ok } interface Cyan { [n:number]: number; // error ~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'number' is not assignable to string index type 'string'. +!!! error TS2413: Numeric index type 'number' is not assignable to string index type 'string'. [s:string]: string; // ok } interface Purple { [n:number, s:string]; // error ~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } interface Magenta { [p:Purple]; // error ~ -!!! An index signature parameter type must be 'string' or 'number'. +!!! error TS1023: An index signature parameter type must be 'string' or 'number'. } var yellow: Yellow; @@ -65,7 +65,7 @@ yellow[blue]; // error ~~~~~~~~~~~~ -!!! An index expression argument must be of type 'string', 'number', or 'any'. +!!! error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. var x:number[]; x[0]; diff --git a/tests/baselines/reference/indexWithoutParamType.errors.txt b/tests/baselines/reference/indexWithoutParamType.errors.txt index 0fc4f4c094..d7e69a6d76 100644 --- a/tests/baselines/reference/indexWithoutParamType.errors.txt +++ b/tests/baselines/reference/indexWithoutParamType.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/indexWithoutParamType.ts (1 errors) ==== var y: { []; } // Error ~~ -!!! An index signature must have exactly one parameter. \ No newline at end of file +!!! error TS1096: An index signature must have exactly one parameter. \ No newline at end of file diff --git a/tests/baselines/reference/indexWithoutParamType2.errors.txt b/tests/baselines/reference/indexWithoutParamType2.errors.txt index 50cdb50379..ba13420e9d 100644 --- a/tests/baselines/reference/indexWithoutParamType2.errors.txt +++ b/tests/baselines/reference/indexWithoutParamType2.errors.txt @@ -2,5 +2,5 @@ class C { [x]: string ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/indexer2A.errors.txt b/tests/baselines/reference/indexer2A.errors.txt index 59575b3ef5..4304280d2b 100644 --- a/tests/baselines/reference/indexer2A.errors.txt +++ b/tests/baselines/reference/indexer2A.errors.txt @@ -4,7 +4,7 @@ // Decided to enforce a semicolon after declarations hasOwnProperty(objectId: number): boolean ~~~~~~~~~~~~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. [objectId: number]: IHeapObjectProperty[] } var directChildrenMap = {}; \ No newline at end of file diff --git a/tests/baselines/reference/indexerAsOptional.errors.txt b/tests/baselines/reference/indexerAsOptional.errors.txt index c76a479193..1657485ce8 100644 --- a/tests/baselines/reference/indexerAsOptional.errors.txt +++ b/tests/baselines/reference/indexerAsOptional.errors.txt @@ -3,12 +3,12 @@ //Index signatures can't be optional [idx?: number]: any; //err ~~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. } class indexSig2 { //Index signatures can't be optional [idx?: number]: any //err ~~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. } \ No newline at end of file diff --git a/tests/baselines/reference/indexerAssignability.errors.txt b/tests/baselines/reference/indexerAssignability.errors.txt index b7dca06f20..ebe65b644f 100644 --- a/tests/baselines/reference/indexerAssignability.errors.txt +++ b/tests/baselines/reference/indexerAssignability.errors.txt @@ -5,16 +5,16 @@ a = b; ~ -!!! Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }': -!!! Index signature is missing in type '{ [x: number]: string; }'. +!!! error TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signature is missing in type '{ [x: number]: string; }'. a = c; ~ -!!! Type '{}' is not assignable to type '{ [x: string]: string; }': -!!! Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }': +!!! error TS2322: Index signature is missing in type '{}'. b = a; b = c; ~ -!!! Type '{}' is not assignable to type '{ [x: number]: string; }': -!!! Index signature is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }': +!!! error TS2322: Index signature is missing in type '{}'. c = a; c = b; \ No newline at end of file diff --git a/tests/baselines/reference/indexerConstraints.errors.txt b/tests/baselines/reference/indexerConstraints.errors.txt index ff0a75e0b7..a0c439b0c3 100644 --- a/tests/baselines/reference/indexerConstraints.errors.txt +++ b/tests/baselines/reference/indexerConstraints.errors.txt @@ -17,7 +17,7 @@ interface E { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // Inheritance @@ -27,7 +27,7 @@ interface G extends F { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // Other way @@ -37,7 +37,7 @@ interface I extends H { [s: string]: B; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // With hidden indexer @@ -47,6 +47,6 @@ interface K extends J { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. [s: string]: B; } \ No newline at end of file diff --git a/tests/baselines/reference/indexerConstraints2.errors.txt b/tests/baselines/reference/indexerConstraints2.errors.txt index 39f16a1b20..c8dd689ed1 100644 --- a/tests/baselines/reference/indexerConstraints2.errors.txt +++ b/tests/baselines/reference/indexerConstraints2.errors.txt @@ -9,7 +9,7 @@ class G extends F { [n: number]: A ~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // Other way @@ -19,7 +19,7 @@ class I extends H { [s: string]: B ~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. } // With hidden indexer @@ -30,6 +30,6 @@ class K extends J { [n: number]: A; ~~~~~~~~~~~~~~~ -!!! Numeric index type 'A' is not assignable to string index type 'B'. +!!! error TS2413: Numeric index type 'A' is not assignable to string index type 'B'. [s: string]: B; } \ No newline at end of file diff --git a/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt b/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt index d97a4d2a19..189c807af8 100644 --- a/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt +++ b/tests/baselines/reference/indexerSignatureWithRestParam.errors.txt @@ -2,11 +2,11 @@ interface I { [...x]: string; ~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. } class C { [...x]: string ~ -!!! An index signature cannot have a rest parameter. +!!! error TS1017: An index signature cannot have a rest parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/indirectSelfReference.errors.txt b/tests/baselines/reference/indirectSelfReference.errors.txt index 209d85233a..1909d2be1d 100644 --- a/tests/baselines/reference/indirectSelfReference.errors.txt +++ b/tests/baselines/reference/indirectSelfReference.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/indirectSelfReference.ts (1 errors) ==== class a extends b{ } ~ -!!! Type 'a' recursively references itself as a base type. +!!! error TS2310: Type 'a' recursively references itself as a base type. class b extends a{ } \ No newline at end of file diff --git a/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt b/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt index 6ce51ab975..538276b872 100644 --- a/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt +++ b/tests/baselines/reference/indirectSelfReferenceGeneric.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/indirectSelfReferenceGeneric.ts (1 errors) ==== class a extends b { } ~ -!!! Type 'a' recursively references itself as a base type. +!!! error TS2310: Type 'a' recursively references itself as a base type. class b extends a { } \ No newline at end of file diff --git a/tests/baselines/reference/inferSetterParamType.errors.txt b/tests/baselines/reference/inferSetterParamType.errors.txt index 5c8a590e62..472a630d09 100644 --- a/tests/baselines/reference/inferSetterParamType.errors.txt +++ b/tests/baselines/reference/inferSetterParamType.errors.txt @@ -3,12 +3,12 @@ get bar() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; } set bar(n) { // should not be an error - infer number ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } @@ -16,14 +16,14 @@ get bar() { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; // should be an error - can't coerce infered return type to match setter annotated type ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } set bar(n:string) { ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt index 8644e8b3e0..6f69c40647 100644 --- a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt +++ b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.errors.txt @@ -4,8 +4,8 @@ } f({ x: [null] }, { x: [1] }).x[0] = "" // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. f({ x: [1] }, { x: [null] }).x[0] = "" // was error TS2011: Cannot convert 'string' to 'number'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt index d1afdb17f4..3e49830ec1 100644 --- a/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt +++ b/tests/baselines/reference/inferredFunctionReturnTypeIsEmptyType.errors.txt @@ -15,5 +15,5 @@ ~~~~~ }; ~ -!!! No best common type exists among return expressions. +!!! error TS2354: No best common type exists among return expressions. \ No newline at end of file diff --git a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt index 577913c10e..49bb2522d6 100644 --- a/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt +++ b/tests/baselines/reference/infiniteExpansionThroughInstantiation.errors.txt @@ -16,18 +16,18 @@ var ownerList: OwnerList; list = ownerList; ~~~~ -!!! Type 'OwnerList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'List' is not assignable to type 'string'. +!!! error TS2322: Type 'OwnerList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'List' is not assignable to type 'string'. function other(x: T) { var list: List; var ownerList: OwnerList; list = ownerList; ~~~~ -!!! Type 'OwnerList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'List' is not assignable to type 'T'. +!!! error TS2322: Type 'OwnerList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'List' is not assignable to type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt b/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt index 958adf5d31..053961c7f1 100644 --- a/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt +++ b/tests/baselines/reference/infiniteExpansionThroughInstantiation2.errors.txt @@ -4,7 +4,7 @@ interface AA> // now an error due to referencing type parameter in constraint ~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. { x: T } diff --git a/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt b/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt index fb3893d9c2..eb7c8df1bb 100644 --- a/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt +++ b/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt @@ -23,7 +23,7 @@ } public get options(): ViewModel { ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } } \ No newline at end of file diff --git a/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt b/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt index 969036a635..b269816dd5 100644 --- a/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt +++ b/tests/baselines/reference/infinitelyExpandingTypes1.errors.txt @@ -21,6 +21,6 @@ l == l2; // should error; ~~~~~~~ -!!! Operator '==' cannot be applied to types 'List' and 'List'. +!!! error TS2365: Operator '==' cannot be applied to types 'List' and 'List'. l == l; // should not error \ No newline at end of file diff --git a/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt b/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt index c9e46e20b9..259c3a303b 100644 --- a/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt +++ b/tests/baselines/reference/infinitelyExpandingTypes2.errors.txt @@ -10,7 +10,7 @@ function f(p: Foo) { console.log(p); ~~~~~~~ -!!! Cannot find name 'console'. +!!! error TS2304: Cannot find name 'console'. } var v: Bar = null; diff --git a/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt b/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt index f294643938..c1a3292867 100644 --- a/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt +++ b/tests/baselines/reference/inheritFromGenericTypeParameter.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/inheritFromGenericTypeParameter.ts (2 errors) ==== class C extends T { } ~ -!!! A class may only extend another class. +!!! error TS2311: A class may only extend another class. interface I extends T { } ~ -!!! An interface may only extend a class or another interface. \ No newline at end of file +!!! error TS2312: An interface may only extend a class or another interface. \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt index c4093032cf..2104eafc86 100644 --- a/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt +++ b/tests/baselines/reference/inheritSameNamePrivatePropertiesFromDifferentOrigins.errors.txt @@ -9,7 +9,7 @@ interface A extends C, C2 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt index 3dc0aa2b25..ca5d0bb80e 100644 --- a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt +++ b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentOptionality.errors.txt @@ -9,7 +9,7 @@ interface A extends C, C2 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt index e8d89b75c0..5b6a6e15a0 100644 --- a/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt +++ b/tests/baselines/reference/inheritSameNamePropertiesWithDifferentVisibility.errors.txt @@ -9,7 +9,7 @@ interface A extends C, C2 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritance.errors.txt b/tests/baselines/reference/inheritance.errors.txt index dfe00fc624..0a0ba7ab86 100644 --- a/tests/baselines/reference/inheritance.errors.txt +++ b/tests/baselines/reference/inheritance.errors.txt @@ -30,12 +30,12 @@ class Baad extends Good { ~~~~ -!!! Class 'Baad' incorrectly extends base class 'Good': -!!! Types of property 'g' are incompatible: -!!! Type '(n: number) => number' is not assignable to type '() => number'. +!!! error TS2416: Class 'Baad' incorrectly extends base class 'Good': +!!! error TS2416: Types of property 'g' are incompatible: +!!! error TS2416: Type '(n: number) => number' is not assignable to type '() => number'. public f(): number { return 0; } ~ -!!! Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. +!!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. public g(n: number) { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritance1.errors.txt b/tests/baselines/reference/inheritance1.errors.txt index 537b7b8fa4..335ebcf266 100644 --- a/tests/baselines/reference/inheritance1.errors.txt +++ b/tests/baselines/reference/inheritance1.errors.txt @@ -14,15 +14,15 @@ } class ImageBase extends Control implements SelectableControl{ ~~~~~~~~~ -!!! Class 'ImageBase' incorrectly implements interface 'SelectableControl': -!!! Property 'select' is missing in type 'ImageBase'. +!!! error TS2421: Class 'ImageBase' incorrectly implements interface 'SelectableControl': +!!! error TS2421: Property 'select' is missing in type 'ImageBase'. } class Image1 extends Control { } class Locations implements SelectableControl { ~~~~~~~~~ -!!! Class 'Locations' incorrectly implements interface 'SelectableControl': -!!! Property 'state' is missing in type 'Locations'. +!!! error TS2421: Class 'Locations' incorrectly implements interface 'SelectableControl': +!!! error TS2421: Property 'state' is missing in type 'Locations'. select() { } } class Locations1 { @@ -37,8 +37,8 @@ b = sc; b = c; ~ -!!! Type 'Control' is not assignable to type 'Button': -!!! Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'Button': +!!! error TS2322: Property 'select' is missing in type 'Control'. var t: TextBox; sc = t; @@ -46,13 +46,13 @@ t = sc; t = c; ~ -!!! Type 'Control' is not assignable to type 'TextBox': -!!! Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'TextBox': +!!! error TS2322: Property 'select' is missing in type 'Control'. var i: ImageBase; sc = i; ~~ -!!! Type 'ImageBase' is not assignable to type 'SelectableControl'. +!!! error TS2323: Type 'ImageBase' is not assignable to type 'SelectableControl'. c = i; i = sc; i = c; @@ -60,8 +60,8 @@ var i1: Image1; sc = i1; ~~ -!!! Type 'Image1' is not assignable to type 'SelectableControl': -!!! Property 'select' is missing in type 'Image1'. +!!! error TS2322: Type 'Image1' is not assignable to type 'SelectableControl': +!!! error TS2322: Property 'select' is missing in type 'Image1'. c = i1; i1 = sc; i1 = c; @@ -69,28 +69,28 @@ var l: Locations; sc = l; ~~ -!!! Type 'Locations' is not assignable to type 'SelectableControl'. +!!! error TS2323: Type 'Locations' is not assignable to type 'SelectableControl'. c = l; ~ -!!! Type 'Locations' is not assignable to type 'Control': -!!! Property 'state' is missing in type 'Locations'. +!!! error TS2322: Type 'Locations' is not assignable to type 'Control': +!!! error TS2322: Property 'state' is missing in type 'Locations'. l = sc; l = c; ~ -!!! Type 'Control' is not assignable to type 'Locations': -!!! Property 'select' is missing in type 'Control'. +!!! error TS2322: Type 'Control' is not assignable to type 'Locations': +!!! error TS2322: Property 'select' is missing in type 'Control'. var l1: Locations1; sc = l1; ~~ -!!! Type 'Locations1' is not assignable to type 'SelectableControl': -!!! Property 'state' is missing in type 'Locations1'. +!!! error TS2322: Type 'Locations1' is not assignable to type 'SelectableControl': +!!! error TS2322: Property 'state' is missing in type 'Locations1'. c = l1; ~ -!!! Type 'Locations1' is not assignable to type 'Control': -!!! Property 'state' is missing in type 'Locations1'. +!!! error TS2322: Type 'Locations1' is not assignable to type 'Control': +!!! error TS2322: Property 'state' is missing in type 'Locations1'. l1 = sc; l1 = c; ~~ -!!! Type 'Control' is not assignable to type 'Locations1': -!!! Property 'select' is missing in type 'Control'. \ No newline at end of file +!!! error TS2322: Type 'Control' is not assignable to type 'Locations1': +!!! error TS2322: Property 'select' is missing in type 'Control'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt index a59e3da0d0..d6266336de 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.errors.txt @@ -7,8 +7,8 @@ class C extends B { ~ -!!! Class 'C' incorrectly extends base class 'B': -!!! Private property 'myMethod' cannot be reimplemented. +!!! error TS2416: Class 'C' incorrectly extends base class 'B': +!!! error TS2416: Private property 'myMethod' cannot be reimplemented. private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt index ca7a3b32b8..a611baeb5d 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.errors.txt @@ -7,8 +7,8 @@ class C extends B { ~ -!!! Class 'C' incorrectly extends base class 'B': -!!! Private property 'myMethod' cannot be reimplemented. +!!! error TS2416: Class 'C' incorrectly extends base class 'B': +!!! error TS2416: Private property 'myMethod' cannot be reimplemented. public myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt index be63f2e9c1..4182f605bd 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.errors.txt @@ -7,8 +7,8 @@ class C extends B { ~ -!!! Class 'C' incorrectly extends base class 'B': -!!! Private property 'myMethod' cannot be reimplemented. +!!! error TS2416: Class 'C' incorrectly extends base class 'B': +!!! error TS2416: Private property 'myMethod' cannot be reimplemented. private myMethod() { } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt index b62b70743c..eefc8622a5 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt @@ -2,12 +2,12 @@ class a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } @@ -15,12 +15,12 @@ class b extends a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt index 3d97822ef7..e2fac91cc0 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt @@ -7,19 +7,19 @@ class b extends a { ~ -!!! Class 'b' incorrectly extends base class 'a': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '() => string'. +!!! error TS2416: Class 'b' incorrectly extends base class 'a': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'string' is not assignable to type '() => string'. get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. +!!! error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt index 85342038c5..b9c41f5bf3 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt @@ -6,12 +6,12 @@ class b extends a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt index 8575f167c0..16c7100958 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt @@ -2,24 +2,24 @@ class a { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class b extends a { ~ -!!! Class 'b' incorrectly extends base class 'a': -!!! Types of property 'x' are incompatible: -!!! Type '() => string' is not assignable to type 'string'. +!!! error TS2416: Class 'b' incorrectly extends base class 'a': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type '() => string' is not assignable to type 'string'. x() { ~ -!!! Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. +!!! error TS2426: Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. return "20"; } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt index 9c1fc8c565..8765865002 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingProperty.errors.txt @@ -6,7 +6,7 @@ class b extends a { x() { ~ -!!! Class 'a' defines instance member property 'x', but extended class 'b' defines it as instance member function. +!!! error TS2425: Class 'a' defines instance member property 'x', but extended class 'b' defines it as instance member function. return "20"; } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt index 45f6ed765d..53a2900718 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt @@ -3,12 +3,12 @@ private __x: () => string; get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.__x; } set x(aValue: () => string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.__x = aValue; } } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt index 03a0e21de7..d8ffad16e2 100644 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt @@ -8,5 +8,5 @@ class b extends a { x: () => string; ~ -!!! Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property. +!!! error TS2424: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property. } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt index 74f1f1409e..9971ec58ca 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt @@ -2,12 +2,12 @@ class a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } @@ -15,12 +15,12 @@ class b extends a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt index 47752c8876..bec8dfb8c9 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt @@ -7,17 +7,17 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '() => string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type 'string' is not assignable to type '() => string'. static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt index 65d69802e8..b5e4dfe5c7 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt @@ -6,12 +6,12 @@ class b extends a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt index 5b015fd54c..7eac31e483 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt @@ -2,21 +2,21 @@ class a { static get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type '() => string' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type '() => string' is not assignable to type 'string'. static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt index 2c3804a5eb..3e511479a3 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt @@ -2,7 +2,7 @@ class a { static get x(): () => string { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt index 346937240e..ed0c5aa78d 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingProperty.errors.txt @@ -5,9 +5,9 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type '() => string' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type '() => string' is not assignable to type 'string'. static x() { return "20"; } diff --git a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt index 92c0c6a83b..08bbc30caa 100644 --- a/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt +++ b/tests/baselines/reference/inheritanceStaticMembersIncompatible.errors.txt @@ -5,8 +5,8 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type 'number' is not assignable to type 'string'. static x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt index 3611d019a2..7e5b568c64 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt @@ -2,12 +2,12 @@ class a { static get x(): () => string { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null;; } static set x(aValue: () => string) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt index 5498010bdd..dcd8517d3c 100644 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingMethod.errors.txt @@ -7,8 +7,8 @@ class b extends a { ~ -!!! Class static side 'typeof b' incorrectly extends base class static side 'typeof a': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type '() => string'. +!!! error TS2418: Class static side 'typeof b' incorrectly extends base class static side 'typeof a': +!!! error TS2418: Types of property 'x' are incompatible: +!!! error TS2418: Type 'string' is not assignable to type '() => string'. static x: string; } \ No newline at end of file diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt index 7a1dcbe5a5..65f1548a1d 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt @@ -13,7 +13,7 @@ // Errors new Derived("", 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new Derived(3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt index c26643584c..6592a61a17 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt @@ -32,10 +32,10 @@ // Errors new Derived(3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new Derived("", 3, "", 3); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new Derived("", 3, "", ""); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt index d02ddfbb14..48abf7585a 100644 --- a/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt +++ b/tests/baselines/reference/inheritedMembersAndIndexSignaturesFromDifferentBases.errors.txt @@ -17,7 +17,7 @@ interface D extends A, B, C { } // error because m is not a subtype of {a;} ~ -!!! Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. interface E { 0: {}; @@ -25,16 +25,16 @@ interface F extends A, B, E { } // error because 0 is not a subtype of {a; b;} ~ -!!! Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. ~ -!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. +!!! error TS2412: Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. interface G extends A, B, C, E { } // should only report one error ~ -!!! Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property '0' of type '{}' is not assignable to string index type '{ a: any; }'. ~ -!!! Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2411: Property 'm' of type '{}' is not assignable to string index type '{ a: any; }'. ~ -!!! Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. +!!! error TS2412: Property '0' of type '{}' is not assignable to numeric index type '{ a: any; b: any; }'. interface H extends A, F { } // Should report no error at all because error is internal to F \ No newline at end of file diff --git a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt index ed90ca4d41..4c7673be48 100644 --- a/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt +++ b/tests/baselines/reference/inheritedModuleMembersForClodule.errors.txt @@ -7,10 +7,10 @@ class D extends C { ~ -!!! Class static side 'typeof D' incorrectly extends base class static side 'typeof C': -!!! Types of property 'foo' are incompatible: -!!! Type '() => number' is not assignable to type '() => string': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2418: Class static side 'typeof D' incorrectly extends base class static side 'typeof C': +!!! error TS2418: Types of property 'foo' are incompatible: +!!! error TS2418: Type '() => number' is not assignable to type '() => string': +!!! error TS2418: Type 'number' is not assignable to type 'string'. } module D { diff --git a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt index cd11979828..b9fd269c2a 100644 --- a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt +++ b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes.errors.txt @@ -13,9 +13,9 @@ } interface E extends A, D { } // error ~ -!!! Interface 'E' incorrectly extends interface 'D': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'E' incorrectly extends interface 'D': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. // Same tests for number indexer @@ -32,6 +32,6 @@ } interface E2 extends A2, D2 { } // error ~~ -!!! Interface 'E2' incorrectly extends interface 'D2': -!!! Index signatures are incompatible: -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2429: Interface 'E2' incorrectly extends interface 'D2': +!!! error TS2429: Index signatures are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt index de29e44ac4..7bac40c20b 100644 --- a/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt +++ b/tests/baselines/reference/inheritedStringIndexersFromDifferentBaseTypes2.errors.txt @@ -18,7 +18,7 @@ } interface E extends A, D { } // error ~ -!!! Numeric index type '{}' is not assignable to string index type '{ a: any; }'. +!!! error TS2413: Numeric index type '{}' is not assignable to string index type '{ a: any; }'. interface F extends A, D { [s: number]: { diff --git a/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt b/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt index 56a9455608..a33473eda2 100644 --- a/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt +++ b/tests/baselines/reference/initializerReferencingConstructorLocals.errors.txt @@ -4,43 +4,43 @@ class C { a = z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. b: typeof z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. c = this.z; // error ~ -!!! Property 'z' does not exist on type 'C'. +!!! error TS2339: Property 'z' does not exist on type 'C'. d: typeof this.z; // error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! Property 'z' does not exist on type 'C'. +!!! error TS2339: Property 'z' does not exist on type 'C'. constructor(x) { z = 1; ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. } } class D { a = z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. b: typeof z; // error ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. c = this.z; // error ~ -!!! Property 'z' does not exist on type 'D'. +!!! error TS2339: Property 'z' does not exist on type 'D'. d: typeof this.z; // error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. ~ -!!! Property 'z' does not exist on type 'D'. +!!! error TS2339: Property 'z' does not exist on type 'D'. constructor(x: T) { z = 1; ~ -!!! Cannot find name 'z'. +!!! error TS2304: Cannot find name 'z'. } } \ No newline at end of file diff --git a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt index 6d137e173c..32516e2cc3 100644 --- a/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt +++ b/tests/baselines/reference/initializerReferencingConstructorParameters.errors.txt @@ -4,20 +4,20 @@ class C { a = x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. b: typeof x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(x) { } } class D { a = x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. b: typeof x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(public x) { } } @@ -25,7 +25,7 @@ a = this.x; // ok b: typeof this.x; // error ~~~~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. constructor(public x) { } } @@ -33,6 +33,6 @@ a = this.x; // ok b = x; // error ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. constructor(public x: T) { } } \ No newline at end of file diff --git a/tests/baselines/reference/initializersInDeclarations.errors.txt b/tests/baselines/reference/initializersInDeclarations.errors.txt index ff2555447c..a2e1e73619 100644 --- a/tests/baselines/reference/initializersInDeclarations.errors.txt +++ b/tests/baselines/reference/initializersInDeclarations.errors.txt @@ -5,30 +5,30 @@ declare class Foo { name = "test"; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. "some prop" = 42; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. fn(): boolean { ~ -!!! A function implementation cannot be declared in an ambient context. +!!! error TS1037: A function implementation cannot be declared in an ambient context. return false; } } declare var x = []; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. declare var y = {}; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. declare module M1 { while(true); ~~~~~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. export var v1 = () => false; ~ -!!! Initializers are not allowed in ambient contexts. +!!! error TS1039: Initializers are not allowed in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/innerAliases.errors.txt b/tests/baselines/reference/innerAliases.errors.txt index f8010153c5..0754c1a726 100644 --- a/tests/baselines/reference/innerAliases.errors.txt +++ b/tests/baselines/reference/innerAliases.errors.txt @@ -19,10 +19,10 @@ var c: D.inner.Class1; ~~~~~~~~~~~~~~ -!!! Module 'D' has no exported member 'inner'. +!!! error TS2305: Module 'D' has no exported member 'inner'. c = new D.inner.Class1(); ~~~~~ -!!! Property 'inner' does not exist on type 'typeof D'. +!!! error TS2339: Property 'inner' does not exist on type 'typeof D'. \ No newline at end of file diff --git a/tests/baselines/reference/innerModExport1.errors.txt b/tests/baselines/reference/innerModExport1.errors.txt index 1f960cd37f..a64e589bd9 100644 --- a/tests/baselines/reference/innerModExport1.errors.txt +++ b/tests/baselines/reference/innerModExport1.errors.txt @@ -5,13 +5,13 @@ var non_export_var: number; module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. var non_export_var = 0; export var export_var = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. function NonExportFunc() { return 0; } @@ -20,11 +20,11 @@ export var outer_var_export = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export function outerFuncExport() { return 0; } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. Outer.ExportFunc(); \ No newline at end of file diff --git a/tests/baselines/reference/innerModExport2.errors.txt b/tests/baselines/reference/innerModExport2.errors.txt index 59c6c4dde8..916da86c57 100644 --- a/tests/baselines/reference/innerModExport2.errors.txt +++ b/tests/baselines/reference/innerModExport2.errors.txt @@ -5,13 +5,13 @@ var non_export_var: number; module { ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. var non_export_var = 0; export var export_var = 1; ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. function NonExportFunc() { return 0; } @@ -21,13 +21,13 @@ export var outer_var_export = 0; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export function outerFuncExport() { return 0; } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. Outer.NonExportFunc(); ~~~~~~~~~~~~~ -!!! Property 'NonExportFunc' does not exist on type 'typeof Outer'. \ No newline at end of file +!!! error TS2339: Property 'NonExportFunc' does not exist on type 'typeof Outer'. \ No newline at end of file diff --git a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt index be79017314..5ccd87e174 100644 --- a/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt +++ b/tests/baselines/reference/innerTypeCheckOfLambdaArgument.errors.txt @@ -10,7 +10,7 @@ // otherwise, there's a bug in overload resolution / partial typechecking var k: string = 10; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } ); \ No newline at end of file diff --git a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt index 124c3ab81d..420e22dbd5 100644 --- a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt +++ b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.errors.txt @@ -7,8 +7,8 @@ bar(x: number): number { C.prototype.bar = () => { } // error ~~~~~~~~~~~~~~~ -!!! Type '() => void' is not assignable to type '(x: number) => number': -!!! Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type '() => void' is not assignable to type '(x: number) => number': +!!! error TS2322: Type 'void' is not assignable to type 'number'. C.prototype.bar = (x) => x; // ok C.prototype.bar = (x: number) => 1; // ok return 1; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt index b6cabdb962..7a45963d26 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt @@ -4,12 +4,12 @@ x: string; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set y(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: number, private b: number) { } } @@ -23,7 +23,7 @@ r.y = 4; var r6 = d.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } @@ -32,12 +32,12 @@ x: T; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } set y(v: U) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: T, private b: U) { } } @@ -51,5 +51,5 @@ r.y = ''; var r6 = d.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } \ No newline at end of file diff --git a/tests/baselines/reference/instancePropertyInClassType.errors.txt b/tests/baselines/reference/instancePropertyInClassType.errors.txt index 79177eb22e..b1d76a267b 100644 --- a/tests/baselines/reference/instancePropertyInClassType.errors.txt +++ b/tests/baselines/reference/instancePropertyInClassType.errors.txt @@ -4,12 +4,12 @@ x: string; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set y(v) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: number, private b: number) { } } @@ -21,7 +21,7 @@ r.y = 4; var r6 = c.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } @@ -30,12 +30,12 @@ x: T; get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } set y(v: U) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: T, private b: U) { } } @@ -47,5 +47,5 @@ r.y = ''; var r6 = c.y(); // error ~~~~~ -!!! Cannot invoke an expression whose type lacks a call signature. +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. } \ No newline at end of file diff --git a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt index d123ec33f9..39de6eb9e4 100644 --- a/tests/baselines/reference/instanceSubtypeCheck2.errors.txt +++ b/tests/baselines/reference/instanceSubtypeCheck2.errors.txt @@ -5,9 +5,9 @@ class C2 extends C1 { ~~ -!!! Class 'C2' incorrectly extends base class 'C1': -!!! Types of property 'x' are incompatible: -!!! Type 'string' is not assignable to type 'C2': -!!! Property 'x' is missing in type 'String'. +!!! error TS2416: Class 'C2' incorrectly extends base class 'C1': +!!! error TS2416: Types of property 'x' are incompatible: +!!! error TS2416: Type 'string' is not assignable to type 'C2': +!!! error TS2416: Property 'x' is missing in type 'String'. x: string } \ No newline at end of file diff --git a/tests/baselines/reference/instanceofOperator.errors.txt b/tests/baselines/reference/instanceofOperator.errors.txt index df7ed3991c..185886562d 100644 --- a/tests/baselines/reference/instanceofOperator.errors.txt +++ b/tests/baselines/reference/instanceofOperator.errors.txt @@ -6,30 +6,30 @@ class Object { } ~~~~~~ -!!! Duplicate identifier 'Object'. +!!! error TS2300: Duplicate identifier 'Object'. var obj: Object; 4 instanceof null; ~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. // Error and should be error obj instanceof 4; ~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. Object instanceof obj; ~~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. // Error on left hand side null instanceof null; ~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. obj instanceof Object; undefined instanceof undefined; ~~~~~~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt index f5698b29c6..a4db17dcd9 100644 --- a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.errors.txt @@ -14,31 +14,31 @@ var ra1 = a1 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra2 = a2 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra3 = a3 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra4 = a4 instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra5 = 0 instanceof x; ~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra6 = true instanceof x; ~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra7 = '' instanceof x; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra8 = null instanceof x; ~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. var ra9 = undefined instanceof x; ~~~~~~~~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. // invalid right operand // the right operand to be of type Any or a subtype of the 'Function' interface type @@ -52,38 +52,38 @@ var rb1 = x instanceof b1; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb2 = x instanceof b2; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb3 = x instanceof b3; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb4 = x instanceof b4; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb5 = x instanceof 0; ~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb6 = x instanceof true; ~~~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb7 = x instanceof ''; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb8 = x instanceof o1; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb9 = x instanceof o2; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. var rb10 = x instanceof o3; ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. // both operands are invalid var rc1 = '' instanceof {}; ~~ -!!! The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. ~~ -!!! The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. \ No newline at end of file +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt b/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt index 1f74e2c9e5..6347027f83 100644 --- a/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt +++ b/tests/baselines/reference/instantiateConstraintsToTypeArguments2.errors.txt @@ -1,11 +1,11 @@ ==== tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts (4 errors) ==== interface A, S extends A> { } ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. interface B, S extends B> extends A, B> { } ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. \ No newline at end of file +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt b/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt index d058f42951..eb37cb97ac 100644 --- a/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt +++ b/tests/baselines/reference/instantiateGenericClassWithWrongNumberOfTypeArguments.errors.txt @@ -8,7 +8,7 @@ var c = new C(); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. class D { x: T @@ -18,4 +18,4 @@ // BUG 794238 var d = new D(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. \ No newline at end of file +!!! error TS2346: Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt index 8129005313..561066ee83 100644 --- a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt +++ b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.errors.txt @@ -8,24 +8,24 @@ var c = new C(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. function Foo(): void { } var r = new Foo(); ~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var f: { (): void }; var r2 = new f(); ~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var a: any; // BUG 790977 var r2 = new a(); ~~~~~~~~~~~~~~~ -!!! Untyped function calls may not accept type arguments. \ No newline at end of file +!!! error TS2347: Untyped function calls may not accept type arguments. \ No newline at end of file diff --git a/tests/baselines/reference/instantiateTypeParameter.errors.txt b/tests/baselines/reference/instantiateTypeParameter.errors.txt index 6d5a507f47..91f8253c0a 100644 --- a/tests/baselines/reference/instantiateTypeParameter.errors.txt +++ b/tests/baselines/reference/instantiateTypeParameter.errors.txt @@ -2,11 +2,11 @@ interface Foo { var x: T<>; ~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~ -!!! Type argument list cannot be empty. +!!! error TS1099: Type argument list cannot be empty. ~~~ -!!! Cannot find name 'T'. +!!! error TS2304: Cannot find name 'T'. } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt b/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt index 489103dc68..985e925138 100644 --- a/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt +++ b/tests/baselines/reference/instantiatedBaseTypeConstraints.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/instantiatedBaseTypeConstraints.ts (1 errors) ==== interface Foo, C> { ~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(bar: C): void; } diff --git a/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt b/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt index f80877a914..765dc431d8 100644 --- a/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt +++ b/tests/baselines/reference/instantiatedBaseTypeConstraints2.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/instantiatedBaseTypeConstraints2.ts (2 errors) ==== interface A, S extends A> { } ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. ~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. interface B extends A, B> { } \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 29462bbf52..4445f11b66 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -35,13 +35,13 @@ //Index Signatures [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. } interface i5 extends i1 { } interface i6 extends i2 { } @@ -76,13 +76,13 @@ //Index Signatures [p]; ~ -!!! An index signature parameter must have a type annotation. +!!! error TS1022: An index signature parameter must have a type annotation. [p1: string]; ~~~~~~~~~~~~ -!!! An index signature must have a type annotation. +!!! error TS1021: An index signature must have a type annotation. [p2: string, p3: number]; ~~ -!!! An index signature must have exactly one parameter. +!!! error TS1096: An index signature must have exactly one parameter. //Property Signatures p; @@ -95,7 +95,7 @@ p7(pa1, pa2): void; p7? (pa1, pa2): void; ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } var anyVar: any; @@ -111,93 +111,93 @@ }; var obj2: i1 = new Object(); ~~~~ -!!! Type 'Object' is not assignable to type 'i1': -!!! Property 'p' is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type 'Object'. var obj3: i1 = new obj0; ~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj4: i1 = new Base; ~~~~ -!!! Type 'Base' is not assignable to type 'i1': -!!! Property 'p' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type 'Base'. var obj5: i1 = null; var obj6: i1 = function () { }; ~~~~ -!!! Type '() => void' is not assignable to type 'i1': -!!! Property 'p' is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type '() => void'. //var obj7: i1 = function foo() { }; var obj8: i1 = anyVar; var obj9: i1 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~ -!!! Type 'boolean' is not assignable to type 'i1': -!!! Property 'p' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i1': +!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i1'. +!!! error TS2304: Cannot find name 'i1'. var obj10: i1 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Call signatures // var obj11: i2; var obj12: i2 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i2'. +!!! error TS2323: Type '{}' is not assignable to type 'i2'. var obj13: i2 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i2'. +!!! error TS2323: Type 'Object' is not assignable to type 'i2'. var obj14: i2 = new obj11; ~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj15: i2 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i2'. +!!! error TS2323: Type 'Base' is not assignable to type 'i2'. var obj16: i2 = null; var obj17: i2 = function ():any { return 0; }; //var obj18: i2 = function foo() { }; var obj19: i2 = anyVar; var obj20: i2 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i2'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i2'. ~~ -!!! Cannot find name 'i2'. +!!! error TS2304: Cannot find name 'i2'. var obj21: i2 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Construct Signatures // var obj22: i3; var obj23: i3 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i3'. +!!! error TS2323: Type '{}' is not assignable to type 'i3'. var obj24: i3 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i3'. +!!! error TS2323: Type 'Object' is not assignable to type 'i3'. var obj25: i3 = new obj22; var obj26: i3 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i3'. +!!! error TS2323: Type 'Base' is not assignable to type 'i3'. var obj27: i3 = null; var obj28: i3 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i3'. +!!! error TS2323: Type '() => void' is not assignable to type 'i3'. //var obj29: i3 = function foo() { }; var obj30: i3 = anyVar; var obj31: i3 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i3'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i3'. ~~ -!!! Cannot find name 'i3'. +!!! error TS2304: Cannot find name 'i3'. var obj32: i3 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Index Signatures // @@ -205,133 +205,133 @@ var obj34: i4 = {}; var obj35: i4 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i4': -!!! Index signature is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type 'Object'. var obj36: i4 = new obj33; ~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj37: i4 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i4': -!!! Index signature is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type 'Base'. var obj38: i4 = null; var obj39: i4 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i4': -!!! Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type '() => void'. //var obj40: i4 = function foo() { }; var obj41: i4 = anyVar; var obj42: i4 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i4': -!!! Index signature is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i4': +!!! error TS2322: Index signature is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i4'. +!!! error TS2304: Cannot find name 'i4'. var obj43: i4 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I1 // var obj44: i5; var obj45: i5 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i5': -!!! Property 'p' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type '{}'. var obj46: i5 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i5': -!!! Property 'p' is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type 'Object'. var obj47: i5 = new obj44; ~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj48: i5 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i5': -!!! Property 'p' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type 'Base'. var obj49: i5 = null; var obj50: i5 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i5': -!!! Property 'p' is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type '() => void'. //var obj51: i5 = function foo() { }; var obj52: i5 = anyVar; var obj53: i5 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i5': -!!! Property 'p' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i5': +!!! error TS2322: Property 'p' is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i5'. +!!! error TS2304: Cannot find name 'i5'. var obj54: i5 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I2 // var obj55: i6; var obj56: i6 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i6'. +!!! error TS2323: Type '{}' is not assignable to type 'i6'. var obj57: i6 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i6'. +!!! error TS2323: Type 'Object' is not assignable to type 'i6'. var obj58: i6 = new obj55; ~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj59: i6 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i6'. +!!! error TS2323: Type 'Base' is not assignable to type 'i6'. var obj60: i6 = null; var obj61: i6 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i6': -!!! Type 'void' is not assignable to type 'number'. +!!! error TS2322: Type '() => void' is not assignable to type 'i6': +!!! error TS2322: Type 'void' is not assignable to type 'number'. //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i6'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i6'. ~~ -!!! Cannot find name 'i6'. +!!! error TS2304: Cannot find name 'i6'. var obj65: i6 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I3 // var obj66: i7; var obj67: i7 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i7'. +!!! error TS2323: Type '{}' is not assignable to type 'i7'. var obj68: i7 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i7'. +!!! error TS2323: Type 'Object' is not assignable to type 'i7'. var obj69: i7 = new obj66; var obj70: i7 = new Base; ~~~~~~~~~~~~ -!!! Neither type 'Base' nor type 'i7' is assignable to the other. +!!! error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. var obj71: i7 = null; var obj72: i7 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i7'. +!!! error TS2323: Type '() => void' is not assignable to type 'i7'. //var obj73: i7 = function foo() { }; var obj74: i7 = anyVar; var obj75: i7 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i7'. +!!! error TS2323: Type 'boolean' is not assignable to type 'i7'. ~~ -!!! Cannot find name 'i7'. +!!! error TS2304: Cannot find name 'i7'. var obj76: i7 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // // Interface Derived I4 // @@ -339,30 +339,30 @@ var obj78: i8 = {}; var obj79: i8 = new Object(); ~~~~~ -!!! Type 'Object' is not assignable to type 'i8': -!!! Index signature is missing in type 'Object'. +!!! error TS2322: Type 'Object' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type 'Object'. var obj80: i8 = new obj77; ~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var obj81: i8 = new Base; ~~~~~ -!!! Type 'Base' is not assignable to type 'i8': -!!! Index signature is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type 'Base'. var obj82: i8 = null; var obj83: i8 = function () { }; ~~~~~ -!!! Type '() => void' is not assignable to type 'i8': -!!! Index signature is missing in type '() => void'. +!!! error TS2322: Type '() => void' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type '() => void'. //var obj84: i8 = function foo() { }; var obj85: i8 = anyVar; var obj86: i8 = new anyVar; ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~ -!!! Type 'boolean' is not assignable to type 'i8': -!!! Index signature is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'i8': +!!! error TS2322: Index signature is missing in type 'Boolean'. ~~ -!!! Cannot find name 'i8'. +!!! error TS2304: Cannot find name 'i8'. var obj87: i8 = new {}; ~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt index 663cb9a56c..c3b69188d3 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt +++ b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt @@ -32,27 +32,27 @@ x=x.sort(CompareYeux); // parameter mismatch ~~~~~~~~~~~ -!!! Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. +!!! error TS2345: Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. // type of z inferred from specialized array type var z=x.sort(CompareEyes); // ok for (var i=0,len=z.length;i=0;j--) { eeks[j]=z[j]; // nope: element assignment ~~~~~~~ -!!! Type 'IEye' is not assignable to type 'IFrenchEye': -!!! Property 'coleur' is missing in type 'IEye'. +!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye': +!!! error TS2322: Property 'coleur' is missing in type 'IEye'. } eeks=z; // nope: array assignment ~~~~ -!!! Type 'IEye[]' is not assignable to type 'IFrenchEye[]': -!!! Type 'IEye' is not assignable to type 'IFrenchEye'. +!!! error TS2322: Type 'IEye[]' is not assignable to type 'IFrenchEye[]': +!!! error TS2322: Type 'IEye' is not assignable to type 'IFrenchEye'. return result; } } diff --git a/tests/baselines/reference/interfaceDeclaration1.errors.txt b/tests/baselines/reference/interfaceDeclaration1.errors.txt index 512f49776e..1b2b3884fb 100644 --- a/tests/baselines/reference/interfaceDeclaration1.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration1.errors.txt @@ -3,14 +3,14 @@ item:number; item:number; ~~~~ -!!! Duplicate identifier 'item'. +!!! error TS2300: Duplicate identifier 'item'. } interface I2 { item:any; item:number; ~~~~ -!!! Duplicate identifier 'item'. +!!! error TS2300: Duplicate identifier 'item'. } interface I3 { @@ -26,7 +26,7 @@ interface I5 extends I5 { ~~ -!!! Type 'I5' recursively references itself as a base type. +!!! error TS2310: Type 'I5' recursively references itself as a base type. foo():void; } @@ -41,8 +41,8 @@ class C1 implements I3 { ~~ -!!! Class 'C1' incorrectly implements interface 'I3': -!!! Property 'prototype' is missing in type 'C1'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I3': +!!! error TS2421: Property 'prototype' is missing in type 'C1'. constructor() { var prototype: number = 3; } @@ -50,7 +50,7 @@ interface i8 extends i9 { } ~~ -!!! Type 'i8' recursively references itself as a base type. +!!! error TS2310: Type 'i8' recursively references itself as a base type. interface i9 extends i8 { } interface i10 { @@ -63,6 +63,6 @@ interface i12 extends i10, i11 { } ~~~ -!!! Interface 'i12' cannot simultaneously extend types 'i10' and 'i11': -!!! Named properties 'foo' of types 'i10' and 'i11' are not identical. +!!! error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11': +!!! error TS2320: Named properties 'foo' of types 'i10' and 'i11' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration2.errors.txt b/tests/baselines/reference/interfaceDeclaration2.errors.txt index a7ee779637..bb0c89521a 100644 --- a/tests/baselines/reference/interfaceDeclaration2.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration2.errors.txt @@ -5,7 +5,7 @@ interface I2 { } class I2 { } ~~ -!!! Duplicate identifier 'I2'. +!!! error TS2300: Duplicate identifier 'I2'. interface I3 { } function I3() { } diff --git a/tests/baselines/reference/interfaceDeclaration3.errors.txt b/tests/baselines/reference/interfaceDeclaration3.errors.txt index f3a861a849..6921072c79 100644 --- a/tests/baselines/reference/interfaceDeclaration3.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration3.errors.txt @@ -6,9 +6,9 @@ interface I2 { item:number; } class C1 implements I1 { ~~ -!!! Class 'C1' incorrectly implements interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': +!!! error TS2421: Types of property 'item' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public item:number; } class C2 implements I1 { @@ -35,9 +35,9 @@ } class C1 implements I1 { ~~ -!!! Class 'C1' incorrectly implements interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': +!!! error TS2421: Types of property 'item' are incompatible: +!!! error TS2421: Type 'number' is not assignable to type 'string'. public item:number; } class C2 implements I1 { @@ -62,7 +62,7 @@ interface I2 extends I1 { item:string; } ~~ -!!! Interface 'I2' incorrectly extends interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'I2' incorrectly extends interface 'I1': +!!! error TS2429: Types of property 'item' are incompatible: +!!! error TS2429: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration4.errors.txt b/tests/baselines/reference/interfaceDeclaration4.errors.txt index 3f81ffba64..64efe9a9da 100644 --- a/tests/baselines/reference/interfaceDeclaration4.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration4.errors.txt @@ -18,9 +18,9 @@ // Negative Case interface I3 extends Foo.I1 { ~~ -!!! Interface 'I3' incorrectly extends interface 'I1': -!!! Types of property 'item' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'I3' incorrectly extends interface 'I1': +!!! error TS2429: Types of property 'item' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. item:number; } @@ -31,8 +31,8 @@ // Err - not implemented item class C2 implements I4 { ~~ -!!! Class 'C2' incorrectly implements interface 'I4': -!!! Property 'item' is missing in type 'C2'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'I4': +!!! error TS2421: Property 'item' is missing in type 'C2'. public token: string; } @@ -43,15 +43,15 @@ class C3 implements Foo.I1 { } ~~ -!!! Class 'C3' incorrectly implements interface 'I1': -!!! Property 'item' is missing in type 'C3'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': +!!! error TS2421: Property 'item' is missing in type 'C3'. // Negative case interface Foo.I1 { } ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~ -!!! Cannot find name 'I1'. +!!! error TS2304: Cannot find name 'I1'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceDeclaration6.errors.txt b/tests/baselines/reference/interfaceDeclaration6.errors.txt index a517250e9b..dfac150cc0 100644 --- a/tests/baselines/reference/interfaceDeclaration6.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration6.errors.txt @@ -3,9 +3,9 @@ interface i2 extends i1 { foo: number; }; interface i3 extends i1 { foo: string; }; ~~ -!!! Interface 'i3' incorrectly extends interface 'i1': -!!! Types of property 'foo' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'i3' incorrectly extends interface 'i1': +!!! error TS2429: Types of property 'foo' are incompatible: +!!! error TS2429: Type 'string' is not assignable to type 'number'. interface i4 { bar():any; bar():any; diff --git a/tests/baselines/reference/interfaceExtendingClass.errors.txt b/tests/baselines/reference/interfaceExtendingClass.errors.txt index 7600d983fd..fbce3c479e 100644 --- a/tests/baselines/reference/interfaceExtendingClass.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClass.errors.txt @@ -4,7 +4,7 @@ y() { } get Z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } [x: string]: Object; diff --git a/tests/baselines/reference/interfaceExtendingClass2.errors.txt b/tests/baselines/reference/interfaceExtendingClass2.errors.txt index 7bd8509ee2..e00e2050e3 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClass2.errors.txt @@ -4,7 +4,7 @@ y() { } get Z() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } [x: string]: Object; @@ -15,15 +15,15 @@ ~~~~ toString: () => { ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'a' of type '{ toString: () => {}; }' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'a' of type '{ toString: () => {}; }' is not assignable to string index type 'Object'. return 1; ~~~~~~ -!!! A 'return' statement can only be used within a function body. +!!! error TS1108: A 'return' statement can only be used within a function body. ~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. }; ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt index 525f9e2d51..894b766876 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates.errors.txt @@ -5,8 +5,8 @@ interface I extends Foo { // error ~ -!!! Interface 'I' incorrectly extends interface 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'I' incorrectly extends interface 'Foo': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: string; } @@ -18,4 +18,4 @@ var r = i.y; var r2 = i.x; // error ~~~ -!!! Property 'Foo.x' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'Foo.x' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt index 9af19f5f67..b308317d05 100644 --- a/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt +++ b/tests/baselines/reference/interfaceExtendingClassWithPrivates2.errors.txt @@ -9,17 +9,17 @@ interface I3 extends Foo, Bar { // error ~~ -!!! Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': -!!! Named properties 'x' of types 'Foo' and 'Bar' are not identical. +!!! error TS2320: Interface 'I3' cannot simultaneously extend types 'Foo' and 'Bar': +!!! error TS2320: Named properties 'x' of types 'Foo' and 'Bar' are not identical. } interface I4 extends Foo, Bar { // error ~~ -!!! Interface 'I4' incorrectly extends interface 'Bar': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'Bar': +!!! error TS2429: Private property 'x' cannot be reimplemented. ~~ -!!! Interface 'I4' incorrectly extends interface 'Foo': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'I4' incorrectly extends interface 'Foo': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: string; } @@ -35,7 +35,7 @@ var r: string = i.z; var r2 = i.x; // error ~~~ -!!! Property 'Foo.x' is inaccessible. +!!! error TS2341: Property 'Foo.x' is inaccessible. var r3 = i.y; // error ~~~ -!!! Property 'Baz.y' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'Baz.y' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt index e9864c85b6..9ffdbb43bc 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.errors.txt @@ -21,17 +21,17 @@ c = i; i = c; // error ~ -!!! Type 'C' is not assignable to type 'I': -!!! Property 'other' is missing in type 'C'. +!!! error TS2322: Type 'C' is not assignable to type 'I': +!!! error TS2322: Property 'other' is missing in type 'C'. i = d; d = i; // error ~ -!!! Type 'I' is not assignable to type 'D': -!!! Property 'bar' is missing in type 'I'. +!!! error TS2322: Type 'I' is not assignable to type 'D': +!!! error TS2322: Property 'bar' is missing in type 'I'. c = d; d = c; // error ~ -!!! Type 'C' is not assignable to type 'D': -!!! Property 'other' is missing in type 'C'. \ No newline at end of file +!!! error TS2322: Type 'C' is not assignable to type 'D': +!!! error TS2322: Property 'other' is missing in type 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt index 54d0ebef98..7d72599ebb 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.errors.txt @@ -10,11 +10,11 @@ class D extends C implements I { // error ~ -!!! Class 'D' incorrectly extends base class 'C': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'D' incorrectly extends base class 'C': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~ -!!! Class 'D' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. public foo(x: any) { return x; } private x = 2; private y = 3; @@ -24,11 +24,11 @@ class D2 extends C implements I { // error ~~ -!!! Class 'D2' incorrectly extends base class 'C': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2416: Class 'D2' incorrectly extends base class 'C': +!!! error TS2416: Private property 'x' cannot be reimplemented. ~~ -!!! Class 'D2' incorrectly implements interface 'I': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D2' incorrectly implements interface 'I': +!!! error TS2421: Private property 'x' cannot be reimplemented. public foo(x: any) { return x; } private x = ""; other(x: any) { return x; } diff --git a/tests/baselines/reference/interfaceImplementation1.errors.txt b/tests/baselines/reference/interfaceImplementation1.errors.txt index f278e16022..9623e4847a 100644 --- a/tests/baselines/reference/interfaceImplementation1.errors.txt +++ b/tests/baselines/reference/interfaceImplementation1.errors.txt @@ -12,11 +12,11 @@ class C1 implements I1,I2 { ~~ -!!! Class 'C1' incorrectly implements interface 'I1': -!!! Private property 'iObj' cannot be reimplemented. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I1': +!!! error TS2421: Private property 'iObj' cannot be reimplemented. ~~ -!!! Class 'C1' incorrectly implements interface 'I2': -!!! Private property 'iFn' cannot be reimplemented. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I2': +!!! error TS2421: Private property 'iFn' cannot be reimplemented. private iFn(); private iFn(n?:number, s?:string) { } private iAny:any; @@ -40,7 +40,7 @@ var a:I4 = function(){ ~ -!!! Type '() => C2' is not assignable to type 'I4'. +!!! error TS2323: Type '() => C2' is not assignable to type 'I4'. return new C2(); } new a(); diff --git a/tests/baselines/reference/interfaceImplementation2.errors.txt b/tests/baselines/reference/interfaceImplementation2.errors.txt index 3e050e9b05..2448ca3a0c 100644 --- a/tests/baselines/reference/interfaceImplementation2.errors.txt +++ b/tests/baselines/reference/interfaceImplementation2.errors.txt @@ -8,8 +8,8 @@ class C3 implements I1 { ~~ -!!! Class 'C3' incorrectly implements interface 'I1': -!!! Property 'iFn' is missing in type 'C3'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': +!!! error TS2421: Property 'iFn' is missing in type 'C3'. public iObj:{ }; public iNum:number; public iAny:any; diff --git a/tests/baselines/reference/interfaceImplementation3.errors.txt b/tests/baselines/reference/interfaceImplementation3.errors.txt index b89b58fc37..51cc85ed78 100644 --- a/tests/baselines/reference/interfaceImplementation3.errors.txt +++ b/tests/baselines/reference/interfaceImplementation3.errors.txt @@ -8,8 +8,8 @@ class C4 implements I1 { ~~ -!!! Class 'C4' incorrectly implements interface 'I1': -!!! Property 'iAny' is missing in type 'C4'. +!!! error TS2421: Class 'C4' incorrectly implements interface 'I1': +!!! error TS2421: Property 'iAny' is missing in type 'C4'. public iObj:{ }; public iNum:number; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation4.errors.txt b/tests/baselines/reference/interfaceImplementation4.errors.txt index e2af897853..12d76119f7 100644 --- a/tests/baselines/reference/interfaceImplementation4.errors.txt +++ b/tests/baselines/reference/interfaceImplementation4.errors.txt @@ -8,8 +8,8 @@ class C5 implements I1 { ~~ -!!! Class 'C5' incorrectly implements interface 'I1': -!!! Property 'iObj' is missing in type 'C5'. +!!! error TS2421: Class 'C5' incorrectly implements interface 'I1': +!!! error TS2421: Property 'iObj' is missing in type 'C5'. public iNum:number; public iAny:any; public iFn() { } diff --git a/tests/baselines/reference/interfaceImplementation5.errors.txt b/tests/baselines/reference/interfaceImplementation5.errors.txt index de49d201e6..f798ed147b 100644 --- a/tests/baselines/reference/interfaceImplementation5.errors.txt +++ b/tests/baselines/reference/interfaceImplementation5.errors.txt @@ -6,43 +6,43 @@ class C1 implements I1 { public get getset1(){return 1;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C2 implements I1 { public set getset1(baz:number){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C3 implements I1 { public get getset1(){return 1;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set getset1(baz:number){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C4 implements I1 { public get getset1(){var x:any; return x;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C5 implements I1 { public set getset1(baz:any){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } class C6 implements I1 { public set getset1(baz:any){} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get getset1(){var x:any; return x;} ~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation6.errors.txt b/tests/baselines/reference/interfaceImplementation6.errors.txt index a935fa60c7..438e4048e4 100644 --- a/tests/baselines/reference/interfaceImplementation6.errors.txt +++ b/tests/baselines/reference/interfaceImplementation6.errors.txt @@ -9,15 +9,15 @@ class C2 implements I1 { ~~ -!!! Class 'C2' incorrectly implements interface 'I1': -!!! Private property 'item' cannot be reimplemented. +!!! error TS2421: Class 'C2' incorrectly implements interface 'I1': +!!! error TS2421: Private property 'item' cannot be reimplemented. private item:number; } class C3 implements I1 { ~~ -!!! Class 'C3' incorrectly implements interface 'I1': -!!! Property 'item' is missing in type 'C3'. +!!! error TS2421: Class 'C3' incorrectly implements interface 'I1': +!!! error TS2421: Property 'item' is missing in type 'C3'. constructor() { var item: number; } diff --git a/tests/baselines/reference/interfaceImplementation7.errors.txt b/tests/baselines/reference/interfaceImplementation7.errors.txt index c39158df66..bddf853846 100644 --- a/tests/baselines/reference/interfaceImplementation7.errors.txt +++ b/tests/baselines/reference/interfaceImplementation7.errors.txt @@ -4,17 +4,17 @@ interface i3 extends i1, i2 { } ~~ -!!! Interface 'i3' cannot simultaneously extend types 'i1' and 'i2': -!!! Named properties 'name' of types 'i1' and 'i2' are not identical. +!!! error TS2320: Interface 'i3' cannot simultaneously extend types 'i1' and 'i2': +!!! error TS2320: Named properties 'name' of types 'i1' and 'i2' are not identical. interface i4 extends i1, i2 { name(): { s: string; n: number; }; } class C1 implements i4 { ~~ -!!! Class 'C1' incorrectly implements interface 'i4': -!!! Types of property 'name' are incompatible: -!!! Type '() => string' is not assignable to type '() => { s: string; n: number; }': -!!! Type 'string' is not assignable to type '{ s: string; n: number; }': -!!! Property 's' is missing in type 'String'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'i4': +!!! error TS2421: Types of property 'name' are incompatible: +!!! error TS2421: Type '() => string' is not assignable to type '() => { s: string; n: number; }': +!!! error TS2421: Type 'string' is not assignable to type '{ s: string; n: number; }': +!!! error TS2421: Property 's' is missing in type 'String'. public name(): string { return ""; } } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation8.errors.txt b/tests/baselines/reference/interfaceImplementation8.errors.txt index 6218ecd6a5..00a57d1b3b 100644 --- a/tests/baselines/reference/interfaceImplementation8.errors.txt +++ b/tests/baselines/reference/interfaceImplementation8.errors.txt @@ -12,8 +12,8 @@ class C2 implements i1 { ~~ -!!! Class 'C2' incorrectly implements interface 'i1': -!!! Private property 'name' cannot be reimplemented. +!!! error TS2421: Class 'C2' incorrectly implements interface 'i1': +!!! error TS2421: Private property 'name' cannot be reimplemented. private name:string; } @@ -24,12 +24,12 @@ class C4 extends C1 implements i1{ } class C5 extends C2 implements i1{ } ~~ -!!! Class 'C5' incorrectly implements interface 'i1': -!!! Private property 'name' cannot be reimplemented. +!!! error TS2421: Class 'C5' incorrectly implements interface 'i1': +!!! error TS2421: Private property 'name' cannot be reimplemented. class C6 extends C3 implements i1{ } ~~ -!!! Class 'C6' incorrectly implements interface 'i1': -!!! Private property 'name' cannot be reimplemented. +!!! error TS2421: Class 'C6' incorrectly implements interface 'i1': +!!! error TS2421: Private property 'name' cannot be reimplemented. /* 2 diff --git a/tests/baselines/reference/interfaceInheritance.errors.txt b/tests/baselines/reference/interfaceInheritance.errors.txt index f8ef8d0861..ec072c5a86 100644 --- a/tests/baselines/reference/interfaceInheritance.errors.txt +++ b/tests/baselines/reference/interfaceInheritance.errors.txt @@ -22,8 +22,8 @@ class C1 implements I2 { // should be an error - it doesn't implement the members of I1 ~~ -!!! Class 'C1' incorrectly implements interface 'I2': -!!! Property 'i1P1' is missing in type 'C1'. +!!! error TS2421: Class 'C1' incorrectly implements interface 'I2': +!!! error TS2421: Property 'i1P1' is missing in type 'C1'. public i2P1: string; } @@ -33,8 +33,8 @@ i1 = i2; i2 = i3; // should be an error - i3 does not implement the members of i1 ~~ -!!! Type 'I3' is not assignable to type 'I2': -!!! Property 'i1P1' is missing in type 'I3'. +!!! error TS2322: Type 'I3' is not assignable to type 'I2': +!!! error TS2322: Property 'i1P1' is missing in type 'I3'. var c1: C1; @@ -43,13 +43,13 @@ i4 = i5; // should be an error ~~ -!!! Type 'I5' is not assignable to type 'I4': -!!! Types of property 'one' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'I5' is not assignable to type 'I4': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. i5 = i4; // should be an error ~~ -!!! Type 'I4' is not assignable to type 'I5': -!!! Types of property 'one' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I4' is not assignable to type 'I5': +!!! error TS2322: Types of property 'one' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt b/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt index a1644c4a28..ac34f4957d 100644 --- a/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt +++ b/tests/baselines/reference/interfaceMayNotBeExtendedWitACall.errors.txt @@ -3,9 +3,9 @@ interface blue extends color() { // error ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceMemberValidation.errors.txt b/tests/baselines/reference/interfaceMemberValidation.errors.txt index c6ce933777..eea81aa99e 100644 --- a/tests/baselines/reference/interfaceMemberValidation.errors.txt +++ b/tests/baselines/reference/interfaceMemberValidation.errors.txt @@ -2,19 +2,19 @@ interface i1 { name: string; } interface i2 extends i1 { name: number; yo: string; } ~~ -!!! Interface 'i2' incorrectly extends interface 'i1': -!!! Types of property 'name' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'i2' incorrectly extends interface 'i1': +!!! error TS2429: Types of property 'name' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. interface foo { bar():any; ~~~~~~~~~~ -!!! Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'. +!!! error TS2411: Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'. bar():any; new():void; new():void; [s:string]:number; [s:string]:number; ~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt b/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt index 055940a5e2..7e3d359600 100644 --- a/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt +++ b/tests/baselines/reference/interfaceNameAsIdentifier.errors.txt @@ -4,7 +4,7 @@ } C(); ~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. module m2 { export interface C { @@ -14,5 +14,5 @@ m2.C(); ~~ -!!! Cannot find name 'm2'. +!!! error TS2304: Cannot find name 'm2'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceNaming1.errors.txt b/tests/baselines/reference/interfaceNaming1.errors.txt index 8f341f0e4c..cc1d5d4bd2 100644 --- a/tests/baselines/reference/interfaceNaming1.errors.txt +++ b/tests/baselines/reference/interfaceNaming1.errors.txt @@ -1,13 +1,13 @@ ==== tests/cases/compiler/interfaceNaming1.ts (4 errors) ==== interface { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~ -!!! Cannot find name 'interface'. +!!! error TS2304: Cannot find name 'interface'. interface interface{ } interface & { } ~~~~~~~~~ -!!! Cannot find name 'interface'. +!!! error TS2304: Cannot find name 'interface'. ~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt b/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt index bf5dead703..18b1798d9b 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt +++ b/tests/baselines/reference/interfacePropertiesWithSameName2.errors.txt @@ -10,8 +10,8 @@ interface MoverShaker extends Mover, Shaker { ~~~~~~~~~~~ -!!! Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker': -!!! Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. +!!! error TS2320: Interface 'MoverShaker' cannot simultaneously extend types 'Mover' and 'Shaker': +!!! error TS2320: Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. } @@ -29,8 +29,8 @@ interface MoverShaker2 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { } // error ~~~~~~~~~~~~ -!!! Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker': -!!! Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. +!!! error TS2320: Interface 'MoverShaker2' cannot simultaneously extend types 'Mover' and 'Shaker': +!!! error TS2320: Named properties 'getStatus' of types 'Mover' and 'Shaker' are not identical. interface MoverShaker3 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { getStatus(): { speed: number; frequency: number; }; // ok because this getStatus overrides the conflicting ones above diff --git a/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt b/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt index 92a1f5782d..79f44d035e 100644 --- a/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt +++ b/tests/baselines/reference/interfacePropertiesWithSameName3.errors.txt @@ -3,13 +3,13 @@ interface E { a: string; } interface F extends E, D { } // error ~ -!!! Interface 'F' cannot simultaneously extend types 'E' and 'D': -!!! Named properties 'a' of types 'E' and 'D' are not identical. +!!! error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D': +!!! error TS2320: Named properties 'a' of types 'E' and 'D' are not identical. class D2 { a: number; } class E2 { a: string; } interface F2 extends E2, D2 { } // error ~~ -!!! Interface 'F2' cannot simultaneously extend types 'E2' and 'D2': -!!! Named properties 'a' of types 'E2' and 'D2' are not identical. +!!! error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2': +!!! error TS2320: Named properties 'a' of types 'E2' and 'D2' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt index 456ed18e00..cfeebed3a4 100644 --- a/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt +++ b/tests/baselines/reference/interfaceThatHidesBaseProperty2.errors.txt @@ -5,11 +5,11 @@ interface Derived extends Base { // error ~~~~~~~ -!!! Interface 'Derived' incorrectly extends interface 'Base': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: string; }' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2429: Interface 'Derived' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: string; }' is not assignable to type '{ a: number; }': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'string' is not assignable to type 'number'. x: { a: string; }; diff --git a/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt b/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt index d13ee9de95..9795d3785f 100644 --- a/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt +++ b/tests/baselines/reference/interfaceThatIndirectlyInheritsFromItself.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts (2 errors) ==== interface Base extends Derived2 { // error ~~~~ -!!! Type 'Base' recursively references itself as a base type. +!!! error TS2310: Type 'Base' recursively references itself as a base type. x: string; } @@ -16,7 +16,7 @@ module Generic { interface Base extends Derived2 { // error ~~~~ -!!! Type 'Base' recursively references itself as a base type. +!!! error TS2310: Type 'Base' recursively references itself as a base type. x: string; } diff --git a/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt b/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt index b88f09304a..0f557e5e2b 100644 --- a/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt +++ b/tests/baselines/reference/interfaceThatInheritsFromItself.errors.txt @@ -1,30 +1,30 @@ ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatInheritsFromItself.ts (8 errors) ==== interface Foo extends Foo { // error ~~~ -!!! Type 'Foo' recursively references itself as a base type. +!!! error TS2310: Type 'Foo' recursively references itself as a base type. } interface Foo2 extends Foo2 { // error ~~~~ -!!! Type 'Foo2' recursively references itself as a base type. +!!! error TS2310: Type 'Foo2' recursively references itself as a base type. } interface Foo3 extends Foo3 { // error ~~~~ -!!! Type 'Foo3' recursively references itself as a base type. +!!! error TS2310: Type 'Foo3' recursively references itself as a base type. } interface Bar implements Bar { // error ~~~~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~ -!!! Cannot find name 'implements'. +!!! error TS2304: Cannot find name 'implements'. ~~~ -!!! Cannot find name 'Bar'. +!!! error TS2304: Cannot find name 'Bar'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithImplements1.errors.txt b/tests/baselines/reference/interfaceWithImplements1.errors.txt index b2b1fdc395..8d9d767cca 100644 --- a/tests/baselines/reference/interfaceWithImplements1.errors.txt +++ b/tests/baselines/reference/interfaceWithImplements1.errors.txt @@ -3,13 +3,13 @@ interface IBar implements IFoo { ~~~~~~~~~~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~~~ -!!! Cannot find name 'implements'. +!!! error TS2304: Cannot find name 'implements'. ~~~~ -!!! Cannot find name 'IFoo'. +!!! error TS2304: Cannot find name 'IFoo'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt index d96a8d33a6..9576b6be38 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes.errors.txt @@ -21,11 +21,11 @@ interface Derived2 extends Base1, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived2' incorrectly extends interface 'Base2': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }': -!!! Types of property 'b' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'Derived2' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: string; b: number; }' is not assignable to type '{ b: string; }': +!!! error TS2429: Types of property 'b' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. x: { a: string; b: number; } @@ -58,22 +58,22 @@ interface Derived3 extends Base1, Base2 { } // error ~~~~~~~~ -!!! Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2': -!!! Named properties 'x' of types 'Base1' and 'Base2' are not identical. +!!! error TS2320: Interface 'Derived3' cannot simultaneously extend types 'Base1' and 'Base2': +!!! error TS2320: Named properties 'x' of types 'Base1' and 'Base2' are not identical. interface Derived4 extends Base1, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived4' incorrectly extends interface 'Base1': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }': -!!! Types of property 'a' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'Derived4' incorrectly extends interface 'Base1': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: T; b: T; }' is not assignable to type '{ a: number; }': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. ~~~~~~~~ -!!! Interface 'Derived4' incorrectly extends interface 'Base2': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }': -!!! Types of property 'b' are incompatible: -!!! Type 'T' is not assignable to type 'number'. +!!! error TS2429: Interface 'Derived4' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: T; b: T; }' is not assignable to type '{ b: number; }': +!!! error TS2429: Types of property 'b' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type 'number'. x: { a: T; b: T; } @@ -81,15 +81,15 @@ interface Derived5 extends Base1, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived5' incorrectly extends interface 'Base1': -!!! Types of property 'x' are incompatible: -!!! Type 'T' is not assignable to type '{ a: T; }': -!!! Property 'a' is missing in type '{}'. +!!! error TS2429: Interface 'Derived5' incorrectly extends interface 'Base1': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type '{ a: T; }': +!!! error TS2429: Property 'a' is missing in type '{}'. ~~~~~~~~ -!!! Interface 'Derived5' incorrectly extends interface 'Base2': -!!! Types of property 'x' are incompatible: -!!! Type 'T' is not assignable to type '{ b: T; }': -!!! Property 'b' is missing in type '{}'. +!!! error TS2429: Interface 'Derived5' incorrectly extends interface 'Base2': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type 'T' is not assignable to type '{ b: T; }': +!!! error TS2429: Property 'b' is missing in type '{}'. x: T; } } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt index 1ade49844d..68a5bff4b8 100644 --- a/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleBaseTypes2.errors.txt @@ -17,11 +17,11 @@ interface Derived2 extends Base, Base2 { // error ~~~~~~~~ -!!! Interface 'Derived2' incorrectly extends interface 'Base': -!!! Types of property 'x' are incompatible: -!!! Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }': -!!! Types of property 'a' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2429: Interface 'Derived2' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'x' are incompatible: +!!! error TS2429: Type '{ a: number; b: string; }' is not assignable to type '{ a?: string; b: string; }': +!!! error TS2429: Types of property 'a' are incompatible: +!!! error TS2429: Type 'number' is not assignable to type 'string'. x: { a: number; b: string } } diff --git a/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt b/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt index 0297e7966f..e0da6884d8 100644 --- a/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt @@ -3,66 +3,66 @@ } interface I1 { // Name mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I1 { // Length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I1 { // constraint present ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I1 { // Length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I1 { // Length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { } interface I2 string> { // constraint mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // constraint absent ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // name mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I2 { // length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } interface I3 { } interface I3 { // length mismatch ~~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. } class Foo { } interface I4> { ~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface I4> { // Should not be error ~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt index b0c2e9fcfd..01d6370f13 100644 --- a/tests/baselines/reference/interfaceWithPrivateMember.errors.txt +++ b/tests/baselines/reference/interfaceWithPrivateMember.errors.txt @@ -4,21 +4,21 @@ interface I { private x: string; ~~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } interface I2 { private y: T; ~~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } var x: { private y: string; ~~~~~~~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt index 543e7fc9ce..45565c8399 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType.errors.txt @@ -5,8 +5,8 @@ interface Foo extends Base { // error ~~~ -!!! Interface 'Foo' incorrectly extends interface 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo' incorrectly extends interface 'Base': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: number; } @@ -16,7 +16,7 @@ interface Foo2 extends Base2 { // error ~~~~ -!!! Interface 'Foo2' incorrectly extends interface 'Base2': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': +!!! error TS2429: Private property 'x' cannot be reimplemented. x: number; } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt index f056d65fe1..e7929304ea 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.errors.txt @@ -5,8 +5,8 @@ interface Foo extends Base { // error ~~~ -!!! Interface 'Foo' incorrectly extends interface 'Base': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo' incorrectly extends interface 'Base': +!!! error TS2429: Private property 'x' cannot be reimplemented. x(): any; } @@ -16,7 +16,7 @@ interface Foo2 extends Base2 { // error ~~~~ -!!! Interface 'Foo2' incorrectly extends interface 'Base2': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2429: Interface 'Foo2' incorrectly extends interface 'Base2': +!!! error TS2429: Private property 'x' cannot be reimplemented. x(): any; } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt index b93e0479e1..8251e0f4e1 100644 --- a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt +++ b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer.errors.txt @@ -17,5 +17,5 @@ ~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Property 'y' of type '{ a: number; }' is not assignable to string index type '{ a: number; b: number; }'. +!!! error TS2411: Property 'y' of type '{ a: number; }' is not assignable to string index type '{ a: number; b: number; }'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt index 965cba8456..93c3ddbaf4 100644 --- a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt +++ b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer2.errors.txt @@ -21,5 +21,5 @@ ~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Property '1' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. +!!! error TS2412: Property '1' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt index 080ffc7fb7..d996fe33d9 100644 --- a/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt +++ b/tests/baselines/reference/interfaceWithStringIndexerHidingBaseTypeIndexer3.errors.txt @@ -17,5 +17,5 @@ ~~~~~~~~~~~~~~~~~~ } ~~~~~ -!!! Property '2' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. +!!! error TS2412: Property '2' of type '{ a: number; }' is not assignable to numeric index type '{ a: number; b: number; }'. } \ No newline at end of file diff --git a/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt b/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt index 118e4c2091..e101c832d0 100644 --- a/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt +++ b/tests/baselines/reference/interfacedeclWithIndexerErrors.errors.txt @@ -12,23 +12,23 @@ p1; p2: string; ~~~~~~~~~~~ -!!! Property 'p2' of type 'string' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'p2' of type 'string' is not assignable to string index type '() => string'. p3?; p4?: number; ~~~~~~~~~~~~ -!!! Property 'p4' of type 'number' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'p4' of type 'number' is not assignable to string index type '() => string'. p5: (s: number) =>string; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'p5' of type '(s: number) => string' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'p5' of type '(s: number) => string' is not assignable to string index type '() => string'. f1(); f2? (); f3(a: string): number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'f3' of type '(a: string) => number' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'f3' of type '(a: string) => number' is not assignable to string index type '() => string'. f4? (s: number): string; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Property 'f4' of type '(s: number) => string' is not assignable to string index type '() => string'. +!!! error TS2411: Property 'f4' of type '(s: number) => string' is not assignable to string index type '() => string'. } diff --git a/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt b/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt index 5daed96e71..b978d1ff39 100644 --- a/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt +++ b/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt @@ -1,16 +1,16 @@ ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts (5 errors) ==== interface any { } ~~~ -!!! Interface name cannot be 'any' +!!! error TS2427: Interface name cannot be 'any' interface number { } ~~~~~~ -!!! Interface name cannot be 'number' +!!! error TS2427: Interface name cannot be 'number' interface string { } ~~~~~~ -!!! Interface name cannot be 'string' +!!! error TS2427: Interface name cannot be 'string' interface boolean { } ~~~~~~~ -!!! Interface name cannot be 'boolean' +!!! error TS2427: Interface name cannot be 'boolean' interface void {} ~~~~ -!!! Identifier expected. \ No newline at end of file +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt index 88f2493425..28441ceb1c 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt @@ -17,4 +17,4 @@ export var d = new m2.m3.c(); ~ -!!! Property 'c' does not exist on type 'typeof m3'. \ No newline at end of file +!!! error TS2339: Property 'c' does not exist on type 'typeof m3'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt index 0c2d7780a1..247be31939 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt @@ -14,4 +14,4 @@ var happyFriday = c.b.Friday; ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt index 3fd6a4f97c..7e91263844 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt @@ -12,4 +12,4 @@ } var d = c.b(11); ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index 3449618944..df96218859 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -13,4 +13,4 @@ export var d = new c.b.c(); ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt index eba8ac4448..0e574a296a 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.errors.txt @@ -11,4 +11,4 @@ var x: c.b; ~~~ -!!! Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file +!!! error TS2305: Module '"tests/cases/compiler/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index b8b04cfc22..290ca99462 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -16,4 +16,4 @@ export var z: c.b.I; ~~~~~ -!!! Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file +!!! error TS2305: Module '"tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError".c' has no exported member 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt index 90723aaa15..9daecade7b 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt @@ -10,4 +10,4 @@ export var z = c.b; ~ -!!! Property 'b' does not exist on type 'typeof c'. \ No newline at end of file +!!! error TS2339: Property 'b' does not exist on type 'typeof c'. \ No newline at end of file diff --git a/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 64d2e92bdd..be47abc137 100644 --- a/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -11,6 +11,6 @@ var A = 1; import Y = A; ~ -!!! Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name } \ No newline at end of file diff --git a/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt index 3cbb49c680..eb534b7a44 100644 --- a/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt @@ -8,6 +8,6 @@ var A = 1; import Y = A; ~ -!!! Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name } \ No newline at end of file diff --git a/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 3e50f2be29..42fc138b2c 100644 --- a/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -10,6 +10,6 @@ var A = 1; import Y = A; ~ -!!! Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name } \ No newline at end of file diff --git a/tests/baselines/reference/intrinsics.errors.txt b/tests/baselines/reference/intrinsics.errors.txt index c2ffc5a2fc..e737bddd06 100644 --- a/tests/baselines/reference/intrinsics.errors.txt +++ b/tests/baselines/reference/intrinsics.errors.txt @@ -2,7 +2,7 @@ var hasOwnProperty: hasOwnProperty; // Error ~~~~~~~~~~~~~~ -!!! Cannot find name 'hasOwnProperty'. +!!! error TS2304: Cannot find name 'hasOwnProperty'. module m1 { export var __proto__; @@ -13,7 +13,7 @@ __proto__ = 0; // Error, __proto__ not defined ~~~~~~~~~ -!!! Cannot find name '__proto__'. +!!! error TS2304: Cannot find name '__proto__'. m1.__proto__ = 0; class Foo<__proto__> { } diff --git a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt index a89539e5da..80ae461103 100644 --- a/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt +++ b/tests/baselines/reference/invalidAssignmentsToVoid.errors.txt @@ -2,42 +2,42 @@ var x: void; x = 1; ~ -!!! Type 'number' is not assignable to type 'void'. +!!! error TS2323: Type 'number' is not assignable to type 'void'. x = true; ~ -!!! Type 'boolean' is not assignable to type 'void'. +!!! error TS2323: Type 'boolean' is not assignable to type 'void'. x = ''; ~ -!!! Type 'string' is not assignable to type 'void'. +!!! error TS2323: Type 'string' is not assignable to type 'void'. x = {} ~ -!!! Type '{}' is not assignable to type 'void'. +!!! error TS2323: Type '{}' is not assignable to type 'void'. class C { foo: string; } var c: C; x = C; ~ -!!! Type 'typeof C' is not assignable to type 'void'. +!!! error TS2323: Type 'typeof C' is not assignable to type 'void'. x = c; ~ -!!! Type 'C' is not assignable to type 'void'. +!!! error TS2323: Type 'C' is not assignable to type 'void'. interface I { foo: string; } var i: I; x = i; ~ -!!! Type 'I' is not assignable to type 'void'. +!!! error TS2323: Type 'I' is not assignable to type 'void'. module M { export var x = 1; } x = M; ~ -!!! Type 'typeof M' is not assignable to type 'void'. +!!! error TS2323: Type 'typeof M' is not assignable to type 'void'. function f(a: T) { x = a; ~ -!!! Type 'T' is not assignable to type 'void'. +!!! error TS2323: Type 'T' is not assignable to type 'void'. } x = f; ~ -!!! Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file +!!! error TS2323: Type '(a: T) => void' is not assignable to type 'void'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidBooleanAssignments.errors.txt b/tests/baselines/reference/invalidBooleanAssignments.errors.txt index 8da60d2e27..9efb82c894 100644 --- a/tests/baselines/reference/invalidBooleanAssignments.errors.txt +++ b/tests/baselines/reference/invalidBooleanAssignments.errors.txt @@ -3,47 +3,47 @@ var a: number = x; ~ -!!! Type 'boolean' is not assignable to type 'number'. +!!! error TS2323: Type 'boolean' is not assignable to type 'number'. var b: string = x; ~ -!!! Type 'boolean' is not assignable to type 'string'. +!!! error TS2323: Type 'boolean' is not assignable to type 'string'. var c: void = x; ~ -!!! Type 'boolean' is not assignable to type 'void'. +!!! error TS2323: Type 'boolean' is not assignable to type 'void'. var d: typeof undefined = x; enum E { A } var e: E = x; ~ -!!! Type 'boolean' is not assignable to type 'E'. +!!! error TS2323: Type 'boolean' is not assignable to type 'E'. class C { foo: string } var f: C = x; ~ -!!! Type 'boolean' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'Boolean'. interface I { bar: string } var g: I = x; ~ -!!! Type 'boolean' is not assignable to type 'I': -!!! Property 'bar' is missing in type 'Boolean'. +!!! error TS2322: Type 'boolean' is not assignable to type 'I': +!!! error TS2322: Property 'bar' is missing in type 'Boolean'. var h: { (): string } = x; ~ -!!! Type 'boolean' is not assignable to type '() => string'. +!!! error TS2323: Type 'boolean' is not assignable to type '() => string'. var h2: { toString(): string } = x; // no error module M { export var a = 1; } M = x; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function i(a: T) { a = x; ~ -!!! Type 'boolean' is not assignable to type 'T'. +!!! error TS2323: Type 'boolean' is not assignable to type 'T'. } i = x; ~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/invalidConstraint1.errors.txt b/tests/baselines/reference/invalidConstraint1.errors.txt index c38b126504..b8eee852d4 100644 --- a/tests/baselines/reference/invalidConstraint1.errors.txt +++ b/tests/baselines/reference/invalidConstraint1.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/invalidConstraint1.ts (1 errors) ==== function f() { ~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. return undefined; } f(); // should error diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt index 9b526d3c21..72331cffda 100644 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.errors.txt @@ -4,13 +4,13 @@ // naked break not allowed break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. // non-existent label ONE: do break TWO; while (true) ~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: @@ -18,7 +18,7 @@ var x = () => { break TWO; ~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -27,7 +27,7 @@ var fn = function () { break THREE; ~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -35,7 +35,7 @@ do { break FIVE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. FIVE: do { } while (true) }while (true) @@ -47,5 +47,5 @@ do { break NINE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. }while (true) \ No newline at end of file diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt index 38c54104d3..4fecc14946 100644 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.errors.txt @@ -4,13 +4,13 @@ // naked continue not allowed continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. // non-existent label ONE: do continue TWO; while (true) ~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: @@ -18,7 +18,7 @@ var x = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -27,7 +27,7 @@ var fn = function () { continue THREE; ~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } }while (true) @@ -35,7 +35,7 @@ do { continue FIVE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. FIVE: do { } while (true) }while (true) @@ -47,5 +47,5 @@ do { continue NINE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. }while (true) \ No newline at end of file diff --git a/tests/baselines/reference/invalidEnumAssignments.errors.txt b/tests/baselines/reference/invalidEnumAssignments.errors.txt index cfbc67c339..a077b10356 100644 --- a/tests/baselines/reference/invalidEnumAssignments.errors.txt +++ b/tests/baselines/reference/invalidEnumAssignments.errors.txt @@ -14,22 +14,22 @@ e = E2.A; ~ -!!! Type 'E2' is not assignable to type 'E'. +!!! error TS2323: Type 'E2' is not assignable to type 'E'. e2 = E.A; ~~ -!!! Type 'E' is not assignable to type 'E2'. +!!! error TS2323: Type 'E' is not assignable to type 'E2'. e = null; ~ -!!! Type 'void' is not assignable to type 'E'. +!!! error TS2323: Type 'void' is not assignable to type 'E'. e = {}; ~ -!!! Type '{}' is not assignable to type 'E'. +!!! error TS2323: Type '{}' is not assignable to type 'E'. e = ''; ~ -!!! Type 'string' is not assignable to type 'E'. +!!! error TS2323: Type 'string' is not assignable to type 'E'. function f(a: T) { e = a; ~ -!!! Type 'T' is not assignable to type 'E'. +!!! error TS2323: Type 'T' is not assignable to type 'E'. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForBreakStatements.errors.txt b/tests/baselines/reference/invalidForBreakStatements.errors.txt index 28c110b110..52e8969c4c 100644 --- a/tests/baselines/reference/invalidForBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForBreakStatements.errors.txt @@ -4,13 +4,13 @@ // naked break not allowed break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. // non-existent label ONE: for(;;) break TWO; ~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: @@ -18,7 +18,7 @@ var x = () => { break TWO; ~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +27,7 @@ var fn = function () { break THREE; ~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +35,7 @@ for(;;) { break FIVE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. FIVE: for (; ;) { } } @@ -46,5 +46,5 @@ for(;;) { break NINE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForContinueStatements.errors.txt b/tests/baselines/reference/invalidForContinueStatements.errors.txt index d3aadb0b69..77bc08f9e3 100644 --- a/tests/baselines/reference/invalidForContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForContinueStatements.errors.txt @@ -4,13 +4,13 @@ // naked continue not allowed continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. // non-existent label ONE: for(;;) continue TWO; ~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: @@ -18,7 +18,7 @@ var x = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +27,7 @@ var fn = function () { continue THREE; ~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +35,7 @@ for(;;) { continue FIVE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. FIVE: for (; ;) { } } @@ -46,5 +46,5 @@ for(;;) { continue NINE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForInBreakStatements.errors.txt b/tests/baselines/reference/invalidForInBreakStatements.errors.txt index 6e29ea04c8..aac66be422 100644 --- a/tests/baselines/reference/invalidForInBreakStatements.errors.txt +++ b/tests/baselines/reference/invalidForInBreakStatements.errors.txt @@ -4,13 +4,13 @@ // naked break not allowed break; ~~~~~~ -!!! A 'break' statement can only be used within an enclosing iteration or switch statement. +!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement. // non-existent label ONE: for (var x in {}) break TWO; ~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. // break from inside function TWO: @@ -18,7 +18,7 @@ var fn = () => { break TWO; ~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +27,7 @@ var fn = function () { break THREE; ~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +35,7 @@ for (var x in {}) { break FIVE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. FIVE: for (var x in {}) { } } @@ -47,5 +47,5 @@ for (var x in {}) { break NINE; ~~~~~~~~~~~ -!!! A 'break' statement can only jump to a label of an enclosing statement. +!!! error TS1116: A 'break' statement can only jump to a label of an enclosing statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidForInContinueStatements.errors.txt b/tests/baselines/reference/invalidForInContinueStatements.errors.txt index f9cf403c97..23c2e0a84b 100644 --- a/tests/baselines/reference/invalidForInContinueStatements.errors.txt +++ b/tests/baselines/reference/invalidForInContinueStatements.errors.txt @@ -4,13 +4,13 @@ // naked continue not allowed continue; ~~~~~~~~~ -!!! A 'continue' statement can only be used within an enclosing iteration statement. +!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement. // non-existent label ONE: for (var x in {}) continue TWO; ~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. // continue from inside function TWO: @@ -18,7 +18,7 @@ var fn = () => { continue TWO; ~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -27,7 +27,7 @@ var fn = function () { continue THREE; ~~~~~~~~~~~~~~~ -!!! Jump target cannot cross function boundary. +!!! error TS1107: Jump target cannot cross function boundary. } } @@ -35,7 +35,7 @@ for (var x in {}) { continue FIVE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. FIVE: for (var x in {}) { } } @@ -47,5 +47,5 @@ for (var x in {}) { continue NINE; ~~~~~~~~~~~~~~ -!!! A 'continue' statement can only jump to a label of an enclosing iteration statement. +!!! error TS1115: A 'continue' statement can only jump to a label of an enclosing iteration statement. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt b/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt index 0248c590eb..75ff3caccb 100644 --- a/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt +++ b/tests/baselines/reference/invalidImportAliasIdentifiers.errors.txt @@ -5,7 +5,7 @@ import v = V; ~~~~~~~~~~~~~ -!!! Cannot find name 'V'. +!!! error TS2304: Cannot find name 'V'. class C { name: string; @@ -13,7 +13,7 @@ import c = C; ~~~~~~~~~~~~~ -!!! Cannot find name 'C'. +!!! error TS2304: Cannot find name 'C'. enum E { Red, Blue @@ -21,7 +21,7 @@ import e = E; ~~~~~~~~~~~~~ -!!! Cannot find name 'E'. +!!! error TS2304: Cannot find name 'E'. interface I { id: number; @@ -29,5 +29,5 @@ import i = I; ~~~~~~~~~~~~~ -!!! Cannot find name 'I'. +!!! error TS2304: Cannot find name 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidInstantiatedModule.errors.txt b/tests/baselines/reference/invalidInstantiatedModule.errors.txt index ed5ae70403..26a51c833b 100644 --- a/tests/baselines/reference/invalidInstantiatedModule.errors.txt +++ b/tests/baselines/reference/invalidInstantiatedModule.errors.txt @@ -3,7 +3,7 @@ export class Point { x: number; y: number } export var Point = 1; // Error ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. } module M2 { @@ -14,7 +14,7 @@ var m = M2; var p: m.Point; // Error ~~~~~~~ -!!! Cannot find name 'm'. +!!! error TS2304: Cannot find name 'm'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt index a9707aedc8..0f9a1c87c7 100644 --- a/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt +++ b/tests/baselines/reference/invalidModuleWithStatementsOfEveryKind.errors.txt @@ -4,11 +4,11 @@ module Y { public class A { s: string } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. public class BB extends A { ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. id: number; } } @@ -16,20 +16,20 @@ module Y2 { public class AA { s: T } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. public interface I { id: number } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. public class B extends AA implements I { id: number } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module Y3 { public module Module { ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. class A { s: string } } } @@ -37,17 +37,17 @@ module Y4 { public enum Color { Blue, Red } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module YY { private class A { s: string } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. private class BB extends A { ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. id: number; } } @@ -55,20 +55,20 @@ module YY2 { private class AA { s: T } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. private interface I { id: number } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. private class B extends AA implements I { id: number } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } module YY3 { private module Module { ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. class A { s: string } } } @@ -76,18 +76,18 @@ module YY4 { private enum Color { Blue, Red } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } module YYY { static class A { s: string } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. static class BB extends A { ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. id: number; } } @@ -95,20 +95,20 @@ module YYY2 { static class AA { s: T } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. static interface I { id: number } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. static class B extends AA implements I { id: number } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } module YYY3 { static module Module { ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. class A { s: string } } } @@ -116,6 +116,6 @@ module YYY4 { static enum Color { Blue, Red } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt b/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt index 80f516a2f6..ab96968532 100644 --- a/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt +++ b/tests/baselines/reference/invalidModuleWithVarStatements.errors.txt @@ -4,37 +4,37 @@ module Y { public var x: number = 0; ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module Y2 { public function fn(x: string) { } ~~~~~~ -!!! 'public' modifier cannot appear on a module element. +!!! error TS1044: 'public' modifier cannot appear on a module element. } module Y4 { static var x: number = 0; ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } module YY { static function fn(x: string) { } ~~~~~~ -!!! 'static' modifier cannot appear on a module element. +!!! error TS1044: 'static' modifier cannot appear on a module element. } module YY2 { private var x: number = 0; ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } module YY3 { private function fn(x: string) { } ~~~~~~~ -!!! 'private' modifier cannot appear on a module element. +!!! error TS1044: 'private' modifier cannot appear on a module element. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt b/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt index b09865a2f2..df6b5f0b21 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.errors.txt @@ -32,47 +32,47 @@ var a: any; var a = 1; ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. var a = 'a string'; ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'string'. var a = new C(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'C'. var a = new D(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'D'. var a = M; ~ -!!! Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'typeof M'. var b: I; var b = new C(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C'. var b = new C2(); ~ -!!! Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'I', but here has type 'C2'. var f = F; var f = (x: number) => ''; ~ -!!! Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'f' must be of type '(x: string) => number', but here has type '(x: number) => string'. var arr: string[]; var arr = [1, 2, 3, 4]; ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type 'number[]'. var arr = [new C(), new C2(), new D()]; ~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr' must be of type 'string[]', but here has type '{}[]'. var arr2 = [new D()]; var arr2 = new Array>(); ~~~~ -!!! Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'arr2' must be of type 'D[]', but here has type 'D[]'. var m: typeof M; var m = M.A; ~ -!!! Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'm' must be of type 'typeof M', but here has type 'typeof A'. \ No newline at end of file diff --git a/tests/baselines/reference/invalidNestedModules.errors.txt b/tests/baselines/reference/invalidNestedModules.errors.txt index 31e8ad2917..57bd053dbd 100644 --- a/tests/baselines/reference/invalidNestedModules.errors.txt +++ b/tests/baselines/reference/invalidNestedModules.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (2 errors) ==== module A.B.C { ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged export class Point { x: number; y: number; @@ -26,7 +26,7 @@ export module X { export var Point: number; // Error ~~~~~ -!!! Duplicate identifier 'Point'. +!!! error TS2300: Duplicate identifier 'Point'. } } diff --git a/tests/baselines/reference/invalidNumberAssignments.errors.txt b/tests/baselines/reference/invalidNumberAssignments.errors.txt index 4bba247a5b..593d962fe1 100644 --- a/tests/baselines/reference/invalidNumberAssignments.errors.txt +++ b/tests/baselines/reference/invalidNumberAssignments.errors.txt @@ -3,46 +3,46 @@ var a: boolean = x; ~ -!!! Type 'number' is not assignable to type 'boolean'. +!!! error TS2323: Type 'number' is not assignable to type 'boolean'. var b: string = x; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var c: void = x; ~ -!!! Type 'number' is not assignable to type 'void'. +!!! error TS2323: Type 'number' is not assignable to type 'void'. var d: typeof undefined = x; class C { foo: string; } var e: C = x; ~ -!!! Type 'number' is not assignable to type 'C': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'C': +!!! error TS2322: Property 'foo' is missing in type 'Number'. interface I { bar: string; } var f: I = x; ~ -!!! Type 'number' is not assignable to type 'I': -!!! Property 'bar' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'I': +!!! error TS2322: Property 'bar' is missing in type 'Number'. var g: { baz: string } = 1; ~ -!!! Type 'number' is not assignable to type '{ baz: string; }': -!!! Property 'baz' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ baz: string; }': +!!! error TS2322: Property 'baz' is missing in type 'Number'. var g2: { 0: number } = 1; ~~ -!!! Type 'number' is not assignable to type '{ 0: number; }': -!!! Property '0' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type '{ 0: number; }': +!!! error TS2322: Property '0' is missing in type 'Number'. module M { export var x = 1; } M = x; ~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. function i(a: T) { a = x; ~ -!!! Type 'number' is not assignable to type 'T'. +!!! error TS2323: Type 'number' is not assignable to type 'T'. } i = x; ~ -!!! Invalid left-hand side of assignment expression. \ No newline at end of file +!!! error TS2364: Invalid left-hand side of assignment expression. \ No newline at end of file diff --git a/tests/baselines/reference/invalidReferenceSyntax1.errors.txt b/tests/baselines/reference/invalidReferenceSyntax1.errors.txt index cad7a35eb0..86a7ca3e99 100644 --- a/tests/baselines/reference/invalidReferenceSyntax1.errors.txt +++ b/tests/baselines/reference/invalidReferenceSyntax1.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/invalidReferenceSyntax1.ts (1 errors) ==== /// >(x: T, y: T): T; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; var maxResult = max2(1, 2); ~ -!!! Argument of type 'number' is not assignable to parameter of type 'Comparable'. \ No newline at end of file +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'Comparable'. \ No newline at end of file diff --git a/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt b/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt index d0b707c9ff..30aadd4ed0 100644 --- a/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt +++ b/tests/baselines/reference/memberFunctionOverloadMixingStaticAndInstance.errors.txt @@ -3,34 +3,34 @@ foo(); static foo(); // error ~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class D { static foo(); foo(); // error ~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class E { foo(x: T); static foo(x: number); // error ~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } class F { static foo(x: number); foo(x: T); // error ~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. ~~~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt index 0a84fc1a75..e92a7ee7f8 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.errors.txt @@ -43,16 +43,16 @@ var c: C; var r = c.foo(1); // error ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. var d: D; var r2 = d.foo(2); // error ~~~~~ -!!! Property 'D.foo' is inaccessible. +!!! error TS2341: Property 'D.foo' is inaccessible. var r3 = C.foo(1); // error ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. var r4 = D.bar(''); // error ~~~~~ -!!! Property 'D.bar' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'D.bar' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt index 962a00d953..c4df9623a5 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt @@ -3,26 +3,26 @@ private foo(x: number); public foo(x: number, y: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(x: any, y?: any) { } private bar(x: 'hi'); public bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private bar(x: number, y: string); private bar(x: any, y?: any) { } private static foo(x: number); public static foo(x: number, y: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static foo(x: any, y?: any) { } private static bar(x: 'hi'); public static bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static bar(x: number, y: string); private static bar(x: any, y?: any) { } } @@ -31,26 +31,26 @@ private foo(x: number); public foo(x: T, y: T); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(x: any, y?: any) { } private bar(x: 'hi'); public bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private bar(x: T, y: T); private bar(x: any, y?: any) { } private static foo(x: number); public static foo(x: number, y: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static foo(x: any, y?: any) { } private static bar(x: 'hi'); public static bar(x: string); // error ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private static bar(x: number, y: string); private static bar(x: any, y?: any) { } } @@ -58,9 +58,9 @@ var c: C; var r = c.foo(1); // error ~~~~~ -!!! Property 'C.foo' is inaccessible. +!!! error TS2341: Property 'C.foo' is inaccessible. var d: D; var r2 = d.foo(2); // error ~~~~~ -!!! Property 'D.foo' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'D.foo' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/memberOverride.errors.txt b/tests/baselines/reference/memberOverride.errors.txt index 4b0b385829..f8a9a70777 100644 --- a/tests/baselines/reference/memberOverride.errors.txt +++ b/tests/baselines/reference/memberOverride.errors.txt @@ -5,9 +5,9 @@ a: "", a: 5 ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. } var n: number = x.a; ~ -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2323: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/memberScope.errors.txt b/tests/baselines/reference/memberScope.errors.txt index 8c059a077f..d18aa39117 100644 --- a/tests/baselines/reference/memberScope.errors.txt +++ b/tests/baselines/reference/memberScope.errors.txt @@ -4,7 +4,7 @@ export module Basil { } var z = Basil.Pepper; ~~~~~ -!!! Cannot find name 'Basil'. +!!! error TS2304: Cannot find name 'Basil'. } \ No newline at end of file diff --git a/tests/baselines/reference/mergedDeclarations2.errors.txt b/tests/baselines/reference/mergedDeclarations2.errors.txt index a7aad4319e..8ad516c013 100644 --- a/tests/baselines/reference/mergedDeclarations2.errors.txt +++ b/tests/baselines/reference/mergedDeclarations2.errors.txt @@ -9,5 +9,5 @@ module Foo { export var x = b ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. } \ No newline at end of file diff --git a/tests/baselines/reference/mergedDeclarations3.errors.txt b/tests/baselines/reference/mergedDeclarations3.errors.txt index 38922ad62f..028dac6e8c 100644 --- a/tests/baselines/reference/mergedDeclarations3.errors.txt +++ b/tests/baselines/reference/mergedDeclarations3.errors.txt @@ -37,8 +37,8 @@ M.foo() // ok M.foo.x // error ~ -!!! Property 'x' does not exist on type 'typeof foo'. +!!! error TS2339: Property 'x' does not exist on type 'typeof foo'. M.foo.y // ok M.foo.z // error ~ -!!! Property 'z' does not exist on type 'typeof foo'. \ No newline at end of file +!!! error TS2339: Property 'z' does not exist on type 'typeof foo'. \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt index cae2b5a705..fdbd483617 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames.errors.txt @@ -6,7 +6,7 @@ interface A { x: number; ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module M { @@ -17,7 +17,7 @@ interface A { x: number; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } @@ -43,6 +43,6 @@ export interface A { x: number; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt index 6c2dd7b657..8dc1ca8847 100644 --- a/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithConflictingPropertyNames2.errors.txt @@ -6,7 +6,7 @@ interface A { x: string; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } module M { @@ -17,7 +17,7 @@ interface A { x: T; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } @@ -43,6 +43,6 @@ export interface A { x: T; // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. } } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt b/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt index 89209f1a4d..dcc21e28f0 100644 --- a/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithIndexers2.errors.txt @@ -4,7 +4,7 @@ interface A { [x: number]: string; // error ~~~~~~~~~~~~~~~~~~~~ -!!! Numeric index type 'string' is not assignable to string index type '{ length: string; }'. +!!! error TS2413: Numeric index type 'string' is not assignable to string index type '{ length: string; }'. } @@ -16,7 +16,7 @@ [x: number]: string; 'a': number; //error ~~~~~~~~~~~~ -!!! Property ''a'' of type 'number' is not assignable to string index type '{ length: number; }'. +!!! error TS2411: Property ''a'' of type 'number' is not assignable to string index type '{ length: number; }'. } @@ -24,6 +24,6 @@ [x: string]: { length: number }; 1: { length: number }; // error ~~~~~~~~~~~~~~~~~~~~~~ -!!! Property '1' of type '{ length: number; }' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '1' of type '{ length: number; }' is not assignable to numeric index type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt index 3ad843c7f1..8858bb75f0 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates.errors.txt @@ -13,8 +13,8 @@ class D implements A { // error ~ -!!! Class 'D' incorrectly implements interface 'A': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'D' incorrectly implements interface 'A': +!!! error TS2421: Private property 'x' cannot be reimplemented. private x: number; y: string; z: string; @@ -22,8 +22,8 @@ class E implements A { // error ~ -!!! Class 'E' incorrectly implements interface 'A': -!!! Private property 'x' cannot be reimplemented. +!!! error TS2421: Class 'E' incorrectly implements interface 'A': +!!! error TS2421: Private property 'x' cannot be reimplemented. x: number; y: string; z: string; @@ -32,4 +32,4 @@ var a: A; var r = a.x; // error ~~~ -!!! Property 'C.x' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C.x' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt index 7ab4058720..fb01ef42af 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates2.errors.txt @@ -17,8 +17,8 @@ class D extends C implements A { // error ~ -!!! Class 'D' incorrectly implements interface 'A': -!!! Private property 'w' cannot be reimplemented. +!!! error TS2421: Class 'D' incorrectly implements interface 'A': +!!! error TS2421: Private property 'w' cannot be reimplemented. private w: number; y: string; z: string; @@ -26,11 +26,11 @@ class E extends C2 implements A { // error ~ -!!! Class 'E' incorrectly extends base class 'C2': -!!! Private property 'w' cannot be reimplemented. +!!! error TS2416: Class 'E' incorrectly extends base class 'C2': +!!! error TS2416: Private property 'w' cannot be reimplemented. ~ -!!! Class 'E' incorrectly implements interface 'A': -!!! Property 'x' is missing in type 'E'. +!!! error TS2421: Class 'E' incorrectly implements interface 'A': +!!! error TS2421: Property 'x' is missing in type 'E'. w: number; y: string; z: string; @@ -39,7 +39,7 @@ var a: A; var r = a.x; // error ~~~ -!!! Property 'C.x' is inaccessible. +!!! error TS2341: Property 'C.x' is inaccessible. var r2 = a.w; // error ~~~ -!!! Property 'C2.w' is inaccessible. \ No newline at end of file +!!! error TS2341: Property 'C2.w' is inaccessible. \ No newline at end of file diff --git a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt index 9956bb45dc..ac7773e14c 100644 --- a/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithInheritedPrivates3.errors.txt @@ -9,8 +9,8 @@ interface A extends C { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } @@ -34,8 +34,8 @@ interface A extends C { // error, privates conflict ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C2': -!!! Named properties 'x' of types 'C' and 'C2' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C2': +!!! error TS2320: Named properties 'x' of types 'C' and 'C2' are not identical. y: string; } diff --git a/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt b/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt index 76f837f836..07b0d79dac 100644 --- a/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt +++ b/tests/baselines/reference/mergedInterfacesWithMultipleBases4.errors.txt @@ -19,8 +19,8 @@ interface A extends C, C3 { // error ~ -!!! Interface 'A' cannot simultaneously extend types 'C' and 'C': -!!! Named properties 'a' of types 'C' and 'C' are not identical. +!!! error TS2320: Interface 'A' cannot simultaneously extend types 'C' and 'C': +!!! error TS2320: Named properties 'a' of types 'C' and 'C' are not identical. y: T; } diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt b/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt index 3cf329d427..8091d66359 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/mergedModuleDeclarationCodeGen.ts (1 errors) ==== export module X { ~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. export module Y { class A { constructor(Y: any) { diff --git a/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt b/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt index f41e12db99..2c24b4493f 100644 --- a/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt +++ b/tests/baselines/reference/methodSignaturesWithOverloads.errors.txt @@ -5,7 +5,7 @@ func4?(x: number): number; func4(s: string): string; // error, mismatched optionality ~~~~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. func5?: { (x: number): number; (s: string): string; @@ -16,7 +16,7 @@ func4(x: T): number; func4? (s: T): string; // error, mismatched optionality ~~~~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. func5?: { (x: T): number; (s: T): string; diff --git a/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt b/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt index 450717d512..be7de2334b 100644 --- a/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt +++ b/tests/baselines/reference/mismatchedClassConstructorVariable.errors.txt @@ -2,5 +2,5 @@ var baz: foo; class baz { } ~~~ -!!! Duplicate identifier 'baz'. +!!! error TS2300: Duplicate identifier 'baz'. class foo { } \ No newline at end of file diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt index 6e2647bc45..e9bda0e33b 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt @@ -10,9 +10,9 @@ var r6 = map([1, ""], (x) => x.toString()); var r7 = map([1, ""], (x) => x.toString()); // error ~~~~~~~ -!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. -!!! Type '{}' is not assignable to type 'number'. +!!! error TS2345: Argument of type '{}[]' is not assignable to parameter of type 'number[]'. +!!! error TS2345: Type '{}' is not assignable to type 'number'. var r7b = map([1, ""], (x) => x.toString()); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. var r8 = map([1, ""], (x) => x.toString()); \ No newline at end of file diff --git a/tests/baselines/reference/missingRequiredDeclare.d.errors.txt b/tests/baselines/reference/missingRequiredDeclare.d.errors.txt index 932512ba8d..f6b2fe3d3b 100644 --- a/tests/baselines/reference/missingRequiredDeclare.d.errors.txt +++ b/tests/baselines/reference/missingRequiredDeclare.d.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/compiler/missingRequiredDeclare.d.ts (2 errors) ==== var x = 1; ~~~ -!!! A 'declare' modifier is required for a top level declaration in a .d.ts file. +!!! error TS1046: A 'declare' modifier is required for a top level declaration in a .d.ts file. ~ -!!! Initializers are not allowed in ambient contexts. \ No newline at end of file +!!! error TS1039: Initializers are not allowed in ambient contexts. \ No newline at end of file diff --git a/tests/baselines/reference/missingReturnStatement.errors.txt b/tests/baselines/reference/missingReturnStatement.errors.txt index 9a92adf4c0..a1004a6334 100644 --- a/tests/baselines/reference/missingReturnStatement.errors.txt +++ b/tests/baselines/reference/missingReturnStatement.errors.txt @@ -3,7 +3,7 @@ export class Bug { public foo():string { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. } } } diff --git a/tests/baselines/reference/missingReturnStatement1.errors.txt b/tests/baselines/reference/missingReturnStatement1.errors.txt index d1d47368bb..397705f995 100644 --- a/tests/baselines/reference/missingReturnStatement1.errors.txt +++ b/tests/baselines/reference/missingReturnStatement1.errors.txt @@ -2,7 +2,7 @@ class Foo { foo(): number { ~~~~~~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. //return 4; } } diff --git a/tests/baselines/reference/missingTypeArguments1.errors.txt b/tests/baselines/reference/missingTypeArguments1.errors.txt index 87bb648a75..95d0c2c341 100644 --- a/tests/baselines/reference/missingTypeArguments1.errors.txt +++ b/tests/baselines/reference/missingTypeArguments1.errors.txt @@ -4,70 +4,70 @@ class X { p1: () => X; ~ -!!! Generic type 'X' requires 1 type argument(s). +!!! error TS2314: Generic type 'X' requires 1 type argument(s). } var a: X; class X2 { p2: { [idx: number]: X2 } ~~ -!!! Generic type 'X2' requires 1 type argument(s). +!!! error TS2314: Generic type 'X2' requires 1 type argument(s). } var a2: X2; class X3 { p3: X3[] ~~ -!!! Generic type 'X3' requires 1 type argument(s). +!!! error TS2314: Generic type 'X3' requires 1 type argument(s). } var a3: X3; class X4 { p4: I ~~ -!!! Generic type 'X4' requires 1 type argument(s). +!!! error TS2314: Generic type 'X4' requires 1 type argument(s). } var a4: X4; class X5 { p5: X5 ~~ -!!! Generic type 'X5' requires 1 type argument(s). +!!! error TS2314: Generic type 'X5' requires 1 type argument(s). } var a5: X5; class X6 { p6: () => Y; ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a6: X6; class X7 { p7: { [idx: number]: Y } ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a7: X7; class X8 { p8: Y[] ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a8: X8; class X9 { p9: I ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a9: X9; class X10 { pa: Y ~ -!!! Generic type 'Y' requires 1 type argument(s). +!!! error TS2314: Generic type 'Y' requires 1 type argument(s). } var a10: X10; diff --git a/tests/baselines/reference/missingTypeArguments2.errors.txt b/tests/baselines/reference/missingTypeArguments2.errors.txt index 34daf27e84..629a83b6f0 100644 --- a/tests/baselines/reference/missingTypeArguments2.errors.txt +++ b/tests/baselines/reference/missingTypeArguments2.errors.txt @@ -3,13 +3,13 @@ var x: () => A; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). (a: A) => { }; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). var y: A; ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). (): A => null; ~ -!!! Generic type 'A' requires 1 type argument(s). \ No newline at end of file +!!! error TS2314: Generic type 'A' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt b/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt index 300d9d0309..49c4838c02 100644 --- a/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt +++ b/tests/baselines/reference/mixingStaticAndInstanceOverloads.errors.txt @@ -5,7 +5,7 @@ foo1(s: string); static foo1(a) { } ~~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. } class C2 { // ERROR @@ -13,27 +13,27 @@ static foo2(s: string); foo2(a) { } ~~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. } class C3 { // ERROR foo3(n: number); static foo3(s: string); ~~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. foo3(a) { } ~~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. } class C4 { // ERROR static foo4(n: number); foo4(s: string); ~~~~ -!!! Function overload must be static. +!!! error TS2387: Function overload must be static. static foo4(a) { } ~~~~ -!!! Function overload must not be static. +!!! error TS2388: Function overload must not be static. } class C5 { // OK diff --git a/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt b/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt index 32368edf11..bce172c159 100644 --- a/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt +++ b/tests/baselines/reference/moduleAndInterfaceSharingName2.errors.txt @@ -8,4 +8,4 @@ var z: X.Y.Z = null; var z2: X.Y; ~~~~~~~~~~~ -!!! Type 'Y' is not generic. \ No newline at end of file +!!! error TS2315: Type 'Y' is not generic. \ No newline at end of file diff --git a/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt b/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt index 7f8ffb11a0..10398dc078 100644 --- a/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt +++ b/tests/baselines/reference/moduleAndInterfaceWithSameName.errors.txt @@ -21,7 +21,7 @@ var z2 = Foo2.Bar.y; // Error for using interface name as a value. ~~~ -!!! Property 'Bar' does not exist on type 'typeof Foo2'. +!!! error TS2339: Property 'Bar' does not exist on type 'typeof Foo2'. module Foo3 { export module Bar { diff --git a/tests/baselines/reference/moduleAsBaseType.errors.txt b/tests/baselines/reference/moduleAsBaseType.errors.txt index 942efd2381..f1c81d8e21 100644 --- a/tests/baselines/reference/moduleAsBaseType.errors.txt +++ b/tests/baselines/reference/moduleAsBaseType.errors.txt @@ -2,10 +2,10 @@ module M {} class C extends M {} ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. interface I extends M { } ~ -!!! Cannot find name 'M'. +!!! error TS2304: Cannot find name 'M'. class C2 implements M { } ~ -!!! Cannot find name 'M'. \ No newline at end of file +!!! error TS2304: Cannot find name 'M'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleAssignmentCompat1.errors.txt b/tests/baselines/reference/moduleAssignmentCompat1.errors.txt index b23e908c08..b4d02acd9c 100644 --- a/tests/baselines/reference/moduleAssignmentCompat1.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat1.errors.txt @@ -9,10 +9,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. // no error a = b; diff --git a/tests/baselines/reference/moduleAssignmentCompat2.errors.txt b/tests/baselines/reference/moduleAssignmentCompat2.errors.txt index 9e6e142168..0d5f9cb133 100644 --- a/tests/baselines/reference/moduleAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat2.errors.txt @@ -9,10 +9,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. a = b; b = a; // error \ No newline at end of file diff --git a/tests/baselines/reference/moduleAssignmentCompat3.errors.txt b/tests/baselines/reference/moduleAssignmentCompat3.errors.txt index c7f5b293da..c260eece38 100644 --- a/tests/baselines/reference/moduleAssignmentCompat3.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat3.errors.txt @@ -8,10 +8,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. // both errors a = b; diff --git a/tests/baselines/reference/moduleAssignmentCompat4.errors.txt b/tests/baselines/reference/moduleAssignmentCompat4.errors.txt index 02b7b9531c..7a7c93767a 100644 --- a/tests/baselines/reference/moduleAssignmentCompat4.errors.txt +++ b/tests/baselines/reference/moduleAssignmentCompat4.errors.txt @@ -12,10 +12,10 @@ var a: A; ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. var b: B; ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. a = b; b = a; // error \ No newline at end of file diff --git a/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt b/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt index 583d88c0b8..b7d8cb447b 100644 --- a/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt +++ b/tests/baselines/reference/moduleClassArrayCodeGenTest.errors.txt @@ -10,4 +10,4 @@ var t: M.A[] = []; var t2: M.B[] = []; ~~~ -!!! Module 'M' has no exported member 'B'. \ No newline at end of file +!!! error TS2305: Module 'M' has no exported member 'B'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleCrashBug1.errors.txt b/tests/baselines/reference/moduleCrashBug1.errors.txt index 8f25fce0c2..ec3a659a29 100644 --- a/tests/baselines/reference/moduleCrashBug1.errors.txt +++ b/tests/baselines/reference/moduleCrashBug1.errors.txt @@ -18,7 +18,7 @@ var m : _modes; ~~~~~~ -!!! Cannot find name '_modes'. +!!! error TS2304: Cannot find name '_modes'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleExports1.errors.txt b/tests/baselines/reference/moduleExports1.errors.txt index e890f149c7..6a1cc3d46b 100644 --- a/tests/baselines/reference/moduleExports1.errors.txt +++ b/tests/baselines/reference/moduleExports1.errors.txt @@ -13,6 +13,6 @@ if (!module.exports) module.exports = ""; ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. ~~~~~~ -!!! Cannot find name 'module'. \ No newline at end of file +!!! error TS2304: Cannot find name 'module'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleImport.errors.txt b/tests/baselines/reference/moduleImport.errors.txt index 9a4e57bdc0..257a59e275 100644 --- a/tests/baselines/reference/moduleImport.errors.txt +++ b/tests/baselines/reference/moduleImport.errors.txt @@ -2,7 +2,7 @@ module A.B.C { import XYZ = X.Y.Z; ~~~~~~~~~~~~~~~~~~~ -!!! Module 'X' has no exported member 'Y'. +!!! error TS2305: Module 'X' has no exported member 'Y'. export function ping(x: number) { if (x>0) XYZ.pong (x-1); } diff --git a/tests/baselines/reference/moduleInTypePosition1.errors.txt b/tests/baselines/reference/moduleInTypePosition1.errors.txt index 7941093c10..37e1ccfcf1 100644 --- a/tests/baselines/reference/moduleInTypePosition1.errors.txt +++ b/tests/baselines/reference/moduleInTypePosition1.errors.txt @@ -3,7 +3,7 @@ import WinJS = require('moduleInTypePosition1_0'); var x = (w1: WinJS) => { }; ~~~~~ -!!! Cannot find name 'WinJS'. +!!! error TS2304: Cannot find name 'WinJS'. ==== tests/cases/compiler/moduleInTypePosition1_0.ts (0 errors) ==== export class Promise { diff --git a/tests/baselines/reference/moduleKeywordRepeatError.errors.txt b/tests/baselines/reference/moduleKeywordRepeatError.errors.txt index 33bb480291..fcc6dc6b59 100644 --- a/tests/baselines/reference/moduleKeywordRepeatError.errors.txt +++ b/tests/baselines/reference/moduleKeywordRepeatError.errors.txt @@ -3,6 +3,6 @@ module.module { } ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! Cannot find name 'module'. \ No newline at end of file +!!! error TS2304: Cannot find name 'module'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleNewExportBug.errors.txt b/tests/baselines/reference/moduleNewExportBug.errors.txt index dd89b135bd..f4e0e14baa 100644 --- a/tests/baselines/reference/moduleNewExportBug.errors.txt +++ b/tests/baselines/reference/moduleNewExportBug.errors.txt @@ -10,7 +10,7 @@ var c : mod1.C; // ERROR: C should not be visible ~~~~~~ -!!! Module 'mod1' has no exported member 'C'. +!!! error TS2305: Module 'mod1' has no exported member 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleProperty1.errors.txt b/tests/baselines/reference/moduleProperty1.errors.txt index 00ff0248b3..48aff3baea 100644 --- a/tests/baselines/reference/moduleProperty1.errors.txt +++ b/tests/baselines/reference/moduleProperty1.errors.txt @@ -9,10 +9,10 @@ var x = 10; // variable local to this module body private y = x; // can't use private in modules ~~~~~~~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. ~ -!!! Cannot find name 'y'. +!!! error TS2304: Cannot find name 'y'. export var z = y; // property visible to any code ~ -!!! Cannot find name 'y'. +!!! error TS2304: Cannot find name 'y'. } \ No newline at end of file diff --git a/tests/baselines/reference/moduleProperty2.errors.txt b/tests/baselines/reference/moduleProperty2.errors.txt index 8b658f7692..fb33a872fc 100644 --- a/tests/baselines/reference/moduleProperty2.errors.txt +++ b/tests/baselines/reference/moduleProperty2.errors.txt @@ -7,13 +7,13 @@ export var z; var test1=x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. var test2=y; // y visible because same module } module N { var test3=M.y; // nope y private property of M ~ -!!! Property 'y' does not exist on type 'typeof M'. +!!! error TS2339: Property 'y' does not exist on type 'typeof M'. var test4=M.z; // ok public property of M } \ No newline at end of file diff --git a/tests/baselines/reference/moduleScoping.errors.txt b/tests/baselines/reference/moduleScoping.errors.txt index d80f82e944..e91fef4529 100644 --- a/tests/baselines/reference/moduleScoping.errors.txt +++ b/tests/baselines/reference/moduleScoping.errors.txt @@ -8,7 +8,7 @@ ==== tests/cases/conformance/externalModules/file3.ts (1 errors) ==== export var v3 = true; ~~~~~~~~~~~~~~~~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. var v2 = [1,2,3]; // Module scope. Should not appear in global scope ==== tests/cases/conformance/externalModules/file4.ts (0 errors) ==== diff --git a/tests/baselines/reference/moduleVisibilityTest2.errors.txt b/tests/baselines/reference/moduleVisibilityTest2.errors.txt index bed0b43505..37a0017688 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest2.errors.txt @@ -57,25 +57,25 @@ module M { export var c = x; ~ -!!! Cannot find name 'x'. +!!! error TS2304: Cannot find name 'x'. export var meb = M.E.B; ~ -!!! Property 'E' does not exist on type 'typeof M'. +!!! error TS2339: Property 'E' does not exist on type 'typeof M'. } var cprime : M.I = null; ~~~ -!!! Module 'M' has no exported member 'I'. +!!! error TS2305: Module 'M' has no exported member 'I'. ~~~ -!!! Module 'M' has no exported member 'I'. +!!! error TS2305: Module 'M' has no exported member 'I'. var c = new M.C(); var z = M.x; ~ -!!! Property 'x' does not exist on type 'typeof M'. +!!! error TS2339: Property 'x' does not exist on type 'typeof M'. var alpha = M.E.A; ~ -!!! Property 'E' does not exist on type 'typeof M'. +!!! error TS2339: Property 'E' does not exist on type 'typeof M'. var omega = M.exported_var; c.someMethodThatCallsAnOuterMethod(); \ No newline at end of file diff --git a/tests/baselines/reference/moduleVisibilityTest3.errors.txt b/tests/baselines/reference/moduleVisibilityTest3.errors.txt index d13c597d6c..d989ed0b5b 100644 --- a/tests/baselines/reference/moduleVisibilityTest3.errors.txt +++ b/tests/baselines/reference/moduleVisibilityTest3.errors.txt @@ -20,12 +20,12 @@ class Bug { constructor(p1: modes, p2: modes.Mode) {// should be an error on p2 - it's not exported ~~~~~ -!!! Cannot find name 'modes'. +!!! error TS2304: Cannot find name 'modes'. ~~~~~~~~~~ -!!! Module '_modes' has no exported member 'Mode'. +!!! error TS2305: Module '_modes' has no exported member 'Mode'. var x:modes.Mode; ~~~~~~~~~~ -!!! Module '_modes' has no exported member 'Mode'. +!!! error TS2305: Module '_modes' has no exported member 'Mode'. } } diff --git a/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt b/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt index e22bdb1c7f..24707faea6 100644 --- a/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt +++ b/tests/baselines/reference/moduleWithNoValuesAsType.errors.txt @@ -2,14 +2,14 @@ module A { } var a: A; // error ~ -!!! Cannot find name 'A'. +!!! error TS2304: Cannot find name 'A'. module B { interface I {} } var b: B; // error ~ -!!! Cannot find name 'B'. +!!! error TS2304: Cannot find name 'B'. module C { module M { @@ -19,4 +19,4 @@ var c: C; // error ~ -!!! Cannot find name 'C'. \ No newline at end of file +!!! error TS2304: Cannot find name 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/moduleWithValuesAsType.errors.txt b/tests/baselines/reference/moduleWithValuesAsType.errors.txt index cf496f7662..d71b412c93 100644 --- a/tests/baselines/reference/moduleWithValuesAsType.errors.txt +++ b/tests/baselines/reference/moduleWithValuesAsType.errors.txt @@ -5,4 +5,4 @@ var a: A; // no error ~ -!!! Cannot find name 'A'. \ No newline at end of file +!!! error TS2304: Cannot find name 'A'. \ No newline at end of file diff --git a/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt b/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt index c2abe8fc6b..36cbfc534a 100644 --- a/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt +++ b/tests/baselines/reference/module_augmentExistingAmbientVariable.errors.txt @@ -3,6 +3,6 @@ module console { ~~~~~~~ -!!! Duplicate identifier 'console'. +!!! error TS2300: Duplicate identifier 'console'. export var x = 2; } \ No newline at end of file diff --git a/tests/baselines/reference/module_augmentExistingVariable.errors.txt b/tests/baselines/reference/module_augmentExistingVariable.errors.txt index 25bd8b843f..8fdad3c5b5 100644 --- a/tests/baselines/reference/module_augmentExistingVariable.errors.txt +++ b/tests/baselines/reference/module_augmentExistingVariable.errors.txt @@ -3,6 +3,6 @@ module console { ~~~~~~~ -!!! Duplicate identifier 'console'. +!!! error TS2300: Duplicate identifier 'console'. export var x = 2; } \ No newline at end of file diff --git a/tests/baselines/reference/moduledecl.errors.txt b/tests/baselines/reference/moduledecl.errors.txt index 927f143183..2359a54aa4 100644 --- a/tests/baselines/reference/moduledecl.errors.txt +++ b/tests/baselines/reference/moduledecl.errors.txt @@ -164,7 +164,7 @@ } private get c2() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return new C2_private(); } public getC1_public() { @@ -174,7 +174,7 @@ } public get c1() { ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return new C1_public(); } } diff --git a/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt b/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt index b412d2ea44..66093b7ea4 100644 --- a/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt +++ b/tests/baselines/reference/multiExtendsSplitInterfaces1.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/multiExtendsSplitInterfaces1.ts (1 errors) ==== self.cancelAnimationFrame(0); ~~~~ -!!! Cannot find name 'self'. \ No newline at end of file +!!! error TS2304: Cannot find name 'self'. \ No newline at end of file diff --git a/tests/baselines/reference/multiLineErrors.errors.txt b/tests/baselines/reference/multiLineErrors.errors.txt index 911c07731e..f9d77cbe5f 100644 --- a/tests/baselines/reference/multiLineErrors.errors.txt +++ b/tests/baselines/reference/multiLineErrors.errors.txt @@ -9,7 +9,7 @@ ~~~~~~~~~~~~~~ } ~ -!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. +!!! error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement. { var x = 4; var y = 10; @@ -26,9 +26,9 @@ var t2: A2; t1 = t2; ~~ -!!! Type 'A2' is not assignable to type 'A1': -!!! Types of property 'x' are incompatible: -!!! Type '{ y: string; }' is not assignable to type '{ y: number; }': -!!! Types of property 'y' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'A2' is not assignable to type 'A1': +!!! error TS2322: Types of property 'x' are incompatible: +!!! error TS2322: Type '{ y: string; }' is not assignable to type '{ y: number; }': +!!! error TS2322: Types of property 'y' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt b/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt index 533cb8f2da..b3c164cdfd 100644 --- a/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt +++ b/tests/baselines/reference/multipleBaseInterfaesWithIncompatibleProperties.errors.txt @@ -6,6 +6,6 @@ interface C extends A, A { } ~ -!!! Interface 'C' cannot simultaneously extend types 'A' and 'A': -!!! Named properties 'x' of types 'A' and 'A' are not identical. +!!! error TS2320: Interface 'C' cannot simultaneously extend types 'A' and 'A': +!!! error TS2320: Named properties 'x' of types 'A' and 'A' are not identical. \ No newline at end of file diff --git a/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt b/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt index 09c39bdbcc..baf9335a07 100644 --- a/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt +++ b/tests/baselines/reference/multipleClassPropertyModifiers.errors.txt @@ -3,9 +3,9 @@ public static p1; static public p2; ~~~~~~ -!!! 'public' modifier must precede 'static' modifier. +!!! error TS1029: 'public' modifier must precede 'static' modifier. private static p3; static private p4; ~~~~~~~ -!!! 'private' modifier must precede 'static' modifier. +!!! error TS1029: 'private' modifier must precede 'static' modifier. } \ No newline at end of file diff --git a/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt b/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt index dd5e4af803..c50eabb777 100644 --- a/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt +++ b/tests/baselines/reference/multipleClassPropertyModifiersErrors.errors.txt @@ -2,19 +2,19 @@ class C { public public p1; ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. private private p2; ~~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. static static p3; ~~~~~~ -!!! 'static' modifier already seen. +!!! error TS1030: 'static' modifier already seen. public private p4; ~~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. private public p5; ~~~~~~ -!!! Accessibility modifier already seen. +!!! error TS1028: Accessibility modifier already seen. public static p6; private static p7; } \ No newline at end of file diff --git a/tests/baselines/reference/multipleExportAssignments.errors.txt b/tests/baselines/reference/multipleExportAssignments.errors.txt index 5f23f30c3e..6751aece20 100644 --- a/tests/baselines/reference/multipleExportAssignments.errors.txt +++ b/tests/baselines/reference/multipleExportAssignments.errors.txt @@ -13,9 +13,9 @@ }; export = server; ~~~~~~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = connectExport; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. \ No newline at end of file diff --git a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt index 8ec47acbc6..ba9442b2fc 100644 --- a/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt +++ b/tests/baselines/reference/multipleExportAssignmentsInAmbientDeclaration.errors.txt @@ -4,8 +4,8 @@ var b: number; export = a; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. export = b; ~~~~~~~~~~~ -!!! A module cannot have more than one export assignment. +!!! error TS2308: A module cannot have more than one export assignment. } \ No newline at end of file diff --git a/tests/baselines/reference/multipleInheritance.errors.txt b/tests/baselines/reference/multipleInheritance.errors.txt index cb3e360fcc..33783c3048 100644 --- a/tests/baselines/reference/multipleInheritance.errors.txt +++ b/tests/baselines/reference/multipleInheritance.errors.txt @@ -9,9 +9,9 @@ class C extends B1, B2 { // duplicate member ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } class D1 extends B1 { @@ -22,9 +22,9 @@ class E extends D1, D2 { // nope, duplicate member ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. } class N { @@ -42,12 +42,12 @@ class Baad extends Good { ~~~~ -!!! Class 'Baad' incorrectly extends base class 'Good': -!!! Types of property 'g' are incompatible: -!!! Type '(n: number) => number' is not assignable to type '() => number'. +!!! error TS2416: Class 'Baad' incorrectly extends base class 'Good': +!!! error TS2416: Types of property 'g' are incompatible: +!!! error TS2416: Type '(n: number) => number' is not assignable to type '() => number'. public f(): number { return 0; } ~ -!!! Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. +!!! error TS2425: Class 'Good' defines instance member property 'f', but extended class 'Baad' defines it as instance member function. public g(n:number) { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/multipleNumericIndexers.errors.txt b/tests/baselines/reference/multipleNumericIndexers.errors.txt index 5ee665a470..6634427c36 100644 --- a/tests/baselines/reference/multipleNumericIndexers.errors.txt +++ b/tests/baselines/reference/multipleNumericIndexers.errors.txt @@ -5,45 +5,45 @@ [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface I { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } var a: { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } var b: { [x: number]: string; [x: number]: string ~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } = { 1: '', "2": '' } class C2 { [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } interface I { ~ -!!! All declarations of an interface must have identical type parameters. +!!! error TS2428: All declarations of an interface must have identical type parameters. [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/multipleStringIndexers.errors.txt b/tests/baselines/reference/multipleStringIndexers.errors.txt index b6328f2edc..61c7d55d75 100644 --- a/tests/baselines/reference/multipleStringIndexers.errors.txt +++ b/tests/baselines/reference/multipleStringIndexers.errors.txt @@ -5,40 +5,40 @@ [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface I { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } var a: { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } var b: { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } = { y: '' } class C2 { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } interface I2 { [x: string]: string; [x: string]: string; ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate string index signature. +!!! error TS2374: Duplicate string index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/multivar.errors.txt b/tests/baselines/reference/multivar.errors.txt index 655a5f42e6..face461a62 100644 --- a/tests/baselines/reference/multivar.errors.txt +++ b/tests/baselines/reference/multivar.errors.txt @@ -6,7 +6,7 @@ export var a, b2: number = 10, b; ~~ -!!! Individual declarations in merged declaration b2 must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration b2 must be all exported or all local. var m1; var a2, b22: number = 10, b222; var m3; @@ -24,7 +24,7 @@ declare var d1, d2; var b2; ~~ -!!! Individual declarations in merged declaration b2 must be all exported or all local. +!!! error TS2395: Individual declarations in merged declaration b2 must be all exported or all local. declare var v1; } diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index f6ac8c0bd6..825a07e8b7 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -4,7 +4,7 @@ module x { // error ~ -!!! Duplicate identifier 'x'. +!!! error TS2300: Duplicate identifier 'x'. export class Bar { test: number; } @@ -15,11 +15,11 @@ } var z; // error ~ -!!! Duplicate identifier 'z'. +!!! error TS2300: Duplicate identifier 'z'. module y { ~ -!!! A module declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A module declaration cannot be located prior to a class or function with which it is merged var b; } @@ -31,12 +31,12 @@ var f; function f() { } //error ~ -!!! Duplicate identifier 'f'. +!!! error TS2300: Duplicate identifier 'f'. function f2() { } var f2; // error ~~ -!!! Duplicate identifier 'f2'. +!!! error TS2300: Duplicate identifier 'f2'. var i; interface i { } //ok @@ -44,12 +44,12 @@ class C { } function C() { } // error ~ -!!! Duplicate identifier 'C'. +!!! error TS2300: Duplicate identifier 'C'. function C2() { } class C2 { } // error ~~ -!!! Duplicate identifier 'C2'. +!!! error TS2300: Duplicate identifier 'C2'. function fi() { } interface fi { } // ok @@ -57,10 +57,10 @@ class cli { } interface cli { } // error ~~~ -!!! Duplicate identifier 'cli'. +!!! error TS2300: Duplicate identifier 'cli'. interface cli2 { } class cli2 { } // error ~~~~ -!!! Duplicate identifier 'cli2'. +!!! error TS2300: Duplicate identifier 'cli2'. } \ No newline at end of file diff --git a/tests/baselines/reference/nameWithFileExtension.errors.txt b/tests/baselines/reference/nameWithFileExtension.errors.txt index 154ed8047f..137daf91a5 100644 --- a/tests/baselines/reference/nameWithFileExtension.errors.txt +++ b/tests/baselines/reference/nameWithFileExtension.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ==== import foo = require('./foo_0.js'); ~~~~~~~~~~~~ -!!! Cannot find external module './foo_0.js'. +!!! error TS2307: Cannot find external module './foo_0.js'. var x = foo.foo + 42; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt b/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt index 22be4433c1..32b55d6f84 100644 --- a/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt +++ b/tests/baselines/reference/namedFunctionExpressionCallErrors.errors.txt @@ -5,7 +5,7 @@ // Error: foo should not be visible here foo(); ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. // recurser should be recurser(); @@ -14,10 +14,10 @@ // Error: foo should not be visible here either foo(); ~~~ -!!! Cannot find name 'foo'. +!!! error TS2304: Cannot find name 'foo'. }); // Error: bar should not be visible bar(); ~~~ -!!! Cannot find name 'bar'. \ No newline at end of file +!!! error TS2304: Cannot find name 'bar'. \ No newline at end of file diff --git a/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt b/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt index f8dc0aeb6d..80f203f253 100644 --- a/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/negateOperatorInvalidOperations.errors.txt @@ -4,30 +4,30 @@ // operand before - var NUMBER1 = var NUMBER-; //expect error ~~~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! '=' expected. +!!! error TS1005: '=' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. // invalid expressions var NUMBER2 = -(null - undefined); ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var NUMBER3 = -(null - null); ~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var NUMBER4 = -(undefined - undefined); ~~~~~~~~~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. // miss operand var NUMBER =-; ~ -!!! Expression expected. \ No newline at end of file +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/nestedClassDeclaration.errors.txt b/tests/baselines/reference/nestedClassDeclaration.errors.txt index 1e64dad496..c5afc94ac2 100644 --- a/tests/baselines/reference/nestedClassDeclaration.errors.txt +++ b/tests/baselines/reference/nestedClassDeclaration.errors.txt @@ -5,31 +5,31 @@ x: string; class C2 { ~~~~~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. function foo() { class C3 { ~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. var x = { class C4 { ~~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~ -!!! Cannot find name 'C4'. +!!! error TS2304: Cannot find name 'C4'. } } ~ -!!! Declaration or statement expected. +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/newExpressionWithCast.errors.txt b/tests/baselines/reference/newExpressionWithCast.errors.txt index a7e9ef10d5..22d24882ea 100644 --- a/tests/baselines/reference/newExpressionWithCast.errors.txt +++ b/tests/baselines/reference/newExpressionWithCast.errors.txt @@ -4,17 +4,17 @@ // valid but error with noImplicitAny var test = new Test(); ~~~~~~~~~~ -!!! 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. function Test2() { } // parse error var test2 = new Test2(); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~~~~~~~~~~~ -!!! Operator '>' cannot be applied to types 'boolean' and 'void'. +!!! error TS2365: Operator '>' cannot be applied to types 'boolean' and 'void'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. function Test3() { } // valid with noImplicitAny diff --git a/tests/baselines/reference/newFunctionImplicitAny.errors.txt b/tests/baselines/reference/newFunctionImplicitAny.errors.txt index 2f507f6155..09b2d0c696 100644 --- a/tests/baselines/reference/newFunctionImplicitAny.errors.txt +++ b/tests/baselines/reference/newFunctionImplicitAny.errors.txt @@ -4,4 +4,4 @@ function Test() { } var test = new Test(); ~~~~~~~~~~ -!!! 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file +!!! error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/newMissingIdentifier.errors.txt b/tests/baselines/reference/newMissingIdentifier.errors.txt index 673129e5b0..1f99c0b357 100644 --- a/tests/baselines/reference/newMissingIdentifier.errors.txt +++ b/tests/baselines/reference/newMissingIdentifier.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/newMissingIdentifier.ts (1 errors) ==== var x = new (); ~ -!!! Expression expected. +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/newNonReferenceType.errors.txt b/tests/baselines/reference/newNonReferenceType.errors.txt index 68761488aa..cd7bae0cd8 100644 --- a/tests/baselines/reference/newNonReferenceType.errors.txt +++ b/tests/baselines/reference/newNonReferenceType.errors.txt @@ -1,8 +1,8 @@ ==== tests/cases/compiler/newNonReferenceType.ts (2 errors) ==== var a = new any(); ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. var b = new boolean(); // error ~~~~~~~ -!!! Cannot find name 'boolean'. +!!! error TS2304: Cannot find name 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/newOnInstanceSymbol.errors.txt b/tests/baselines/reference/newOnInstanceSymbol.errors.txt index 11f9e589db..9a7145055e 100644 --- a/tests/baselines/reference/newOnInstanceSymbol.errors.txt +++ b/tests/baselines/reference/newOnInstanceSymbol.errors.txt @@ -3,4 +3,4 @@ var x = new C(); // should be ok new x(); // should error ~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/newOperator.errors.txt b/tests/baselines/reference/newOperator.errors.txt index f522ce63f8..440c6e5c8b 100644 --- a/tests/baselines/reference/newOperator.errors.txt +++ b/tests/baselines/reference/newOperator.errors.txt @@ -3,7 +3,7 @@ // Attempting to 'new' an interface yields poor error var i = new ifc(); ~~~ -!!! Cannot find name 'ifc'. +!!! error TS2304: Cannot find name 'ifc'. // Parens are optional var x = new Date; @@ -12,13 +12,13 @@ // Target is not a class or var, good error var t1 = new 53(); ~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. var t2 = new ''(); ~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. new string; ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. // Use in LHS of expression? (new Date()).toString(); @@ -26,31 +26,31 @@ // Various spacing var t3 = new string[]( ); ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. var t4 = new string ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. [ ~ ] ~~~~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ( ); // Unresolved symbol var f = new q(); ~ -!!! Cannot find name 'q'. +!!! error TS2304: Cannot find name 'q'. // not legal var t5 = new new Date; ~~~~~~~~~~~~ -!!! Cannot use 'new' with an expression whose type lacks a call or construct signature. +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. // Can be an expression new String; @@ -66,7 +66,7 @@ public get xs(): M.T[] { return new M.T[]; ~~ -!!! 'new T[]' cannot be used to create an array. Use 'new Array()' instead. +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. } } \ No newline at end of file diff --git a/tests/baselines/reference/newOperatorErrorCases.errors.txt b/tests/baselines/reference/newOperatorErrorCases.errors.txt index 17dd55d0eb..8cb27c748a 100644 --- a/tests/baselines/reference/newOperatorErrorCases.errors.txt +++ b/tests/baselines/reference/newOperatorErrorCases.errors.txt @@ -27,21 +27,21 @@ // Construct expression with no parentheses for construct signature with > 0 parameters var b = new C0 32, ''; // Parse error ~~ -!!! ',' expected. +!!! error TS1005: ',' expected. // Generic construct expression with no parentheses var c1 = new T; var c1: T<{}>; var c2 = new T; // Parse error ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. // Construct expression of non-void returning function function fnNumber(): number { return 32; } var s = new fnNumber(); // Error ~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. +!!! error TS2350: Only a void function can be called with the 'new' keyword. \ No newline at end of file diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt index 04b5ae07b6..655b2e0b83 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt @@ -2,7 +2,7 @@ class class1 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; @@ -14,7 +14,7 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; @@ -28,7 +28,7 @@ class class2 { get a(): number { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; var x2 = { doStuff: (callback) => () => { @@ -40,7 +40,7 @@ } set a(val: number) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; var x2 = { doStuff: (callback) => () => { diff --git a/tests/baselines/reference/noDefaultLib.errors.txt b/tests/baselines/reference/noDefaultLib.errors.txt index 2f411affd5..6858d080e0 100644 --- a/tests/baselines/reference/noDefaultLib.errors.txt +++ b/tests/baselines/reference/noDefaultLib.errors.txt @@ -1,12 +1,12 @@ -!!! Cannot find global type 'Boolean'. -!!! Cannot find global type 'IArguments'. +!!! error TS2318: Cannot find global type 'Boolean'. +!!! error TS2318: Cannot find global type 'IArguments'. ==== tests/cases/compiler/noDefaultLib.ts (1 errors) ==== /// var x; interface Array {} ~~~~~ -!!! Global type 'Array' must have 1 type parameter(s). +!!! error TS2317: Global type 'Array' must have 1 type parameter(s). interface String {} interface Number {} interface Object {} diff --git a/tests/baselines/reference/noErrorsInCallback.errors.txt b/tests/baselines/reference/noErrorsInCallback.errors.txt index cd7c4beb64..75d8dc1488 100644 --- a/tests/baselines/reference/noErrorsInCallback.errors.txt +++ b/tests/baselines/reference/noErrorsInCallback.errors.txt @@ -4,10 +4,10 @@ } var one = new Bar({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. [].forEach(() => { var two = new Bar({}); // No error? ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. }); \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyForIn.errors.txt b/tests/baselines/reference/noImplicitAnyForIn.errors.txt index 7e4122a8f2..48ceebede9 100644 --- a/tests/baselines/reference/noImplicitAnyForIn.errors.txt +++ b/tests/baselines/reference/noImplicitAnyForIn.errors.txt @@ -8,7 +8,7 @@ //Should yield an implicit 'any' error var _j = x[i][j]; ~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. } for (var k in x[0]) { @@ -17,7 +17,7 @@ //Should yield an implicit 'any' error var k2 = k1[k]; ~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. } } @@ -25,7 +25,7 @@ // Should yield an implicit 'any' error. var b; ~ -!!! Variable 'b' implicitly has an 'any' type. +!!! error TS7005: Variable 'b' implicitly has an 'any' type. var c = a || b; } @@ -35,8 +35,8 @@ // Should yield an implicit 'any' error. var n = [[]] || []; ~ -!!! Variable 'n' implicitly has an 'any[][]' type. +!!! error TS7005: Variable 'n' implicitly has an 'any[][]' type. for (n[idx++] in m); ~~~~~~~~ -!!! The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. \ No newline at end of file +!!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt b/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt index 622914ea41..0c37557473 100644 --- a/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt +++ b/tests/baselines/reference/noImplicitAnyForMethodParameters.errors.txt @@ -6,18 +6,18 @@ declare class B { public foo(a); // OK - ambient class and public method - error ~~~~~~~~~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. } class C { private foo(a) { } // OK - non-ambient class and private method - error ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. } class D { public foo(a) { } // OK - non-ambient class and public method - error ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt b/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt index 7d02a12556..5969d75385 100644 --- a/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyForwardReferencedInterface.errors.txt @@ -5,5 +5,5 @@ // Should return error for implicit any. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt b/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt index 89c4ffe6ac..566b1fbbe9 100644 --- a/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt +++ b/tests/baselines/reference/noImplicitAnyFunctionExpressionAssignment.errors.txt @@ -6,7 +6,7 @@ ~~~~~~~~~~~~~~~~ }; ~ -!!! Function expression, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7011: Function expression, which lacks return-type annotation, implicitly has an 'any' return type. var x2: (a: any) => void = function f(x: T) { ~~~~~~~~~~~~~~~~~~~~~ @@ -14,4 +14,4 @@ ~~~~~~~~~~~~~~~~ }; ~ -!!! 'f', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file +!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyFunctions.errors.txt b/tests/baselines/reference/noImplicitAnyFunctions.errors.txt index a3768a1c7a..5e8abc022d 100644 --- a/tests/baselines/reference/noImplicitAnyFunctions.errors.txt +++ b/tests/baselines/reference/noImplicitAnyFunctions.errors.txt @@ -2,13 +2,13 @@ declare function f1(); ~~~~~~~~~~~~~~~~~~~~~~ -!!! 'f1', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f1', which lacks return-type annotation, implicitly has an 'any' return type. declare function f2(): any; function f3(x) { ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. } function f4(x: any) { @@ -21,14 +21,14 @@ function f6(x: string, y: number); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'f6', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. function f6(x: string, y: string): any; function f6(x: string, y) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. return null; ~~~~~~~~~~~~~~~~ } ~ -!!! 'f6', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file +!!! error TS7010: 'f6', which lacks return-type annotation, implicitly has an 'any' return type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt b/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt index f96c1b9882..5bae0c2c8d 100644 --- a/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyInBareInterface.errors.txt @@ -4,9 +4,9 @@ // Should return error for implicit any on `new` and `foo`. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. few() : any; foo(); ~~~~~~ -!!! 'foo', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'foo', which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt index bc7542df51..12bfd7f03e 100644 --- a/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.errors.txt @@ -16,5 +16,5 @@ // Neither types is assignable to each other ({ c: null }); ~~~~~~~~~~~~~~~~~ -!!! Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: -!!! Property 'a' is missing in type '{ c: null; }'. \ No newline at end of file +!!! error TS2353: Neither type '{ c: null; }' nor type 'IFoo' is assignable to the other: +!!! error TS2353: Property 'a' is missing in type '{ c: null; }'. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyIndexing.errors.txt b/tests/baselines/reference/noImplicitAnyIndexing.errors.txt index 857809c3e8..fde705cb40 100644 --- a/tests/baselines/reference/noImplicitAnyIndexing.errors.txt +++ b/tests/baselines/reference/noImplicitAnyIndexing.errors.txt @@ -13,7 +13,7 @@ // Should be implicit 'any' ; property access fails, no string indexer. var strRepresentation3 = MyEmusEnum["monehh"]; ~~~~~~~~~~~~~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. // Should be okay; should be a MyEmusEnum var strRepresentation4 = MyEmusEnum["emu"]; @@ -22,12 +22,12 @@ // Should report an implicit 'any'. var x = {}["hi"]; ~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. // Should report an implicit 'any'. var y = {}[10]; ~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. var hi: any = "hi"; @@ -37,7 +37,7 @@ // Should report an implicit 'any'. var z1 = emptyObj[hi]; ~~~~~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. +!!! error TS7017: Index signature of object type implicitly has an 'any' type. var z2 = (emptyObj)[hi]; interface MyMap { diff --git a/tests/baselines/reference/noImplicitAnyModule.errors.txt b/tests/baselines/reference/noImplicitAnyModule.errors.txt index 81e07fad9c..5deb74ad9b 100644 --- a/tests/baselines/reference/noImplicitAnyModule.errors.txt +++ b/tests/baselines/reference/noImplicitAnyModule.errors.txt @@ -5,17 +5,17 @@ // Should return error for implicit any on return type. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } class Class { // Should return error for implicit `any` on parameter. public f(x): any; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. public g(x: any); ~~~~~~~~~~~~~~~~~ -!!! 'g', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'g', which lacks return-type annotation, implicitly has an 'any' return type. // Should not return error at all. private h(x); @@ -24,6 +24,6 @@ // Should return error for implicit any on return type. function f(x: number); ~~~~~~~~~~~~~~~~~~~~~~ -!!! 'f', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'f', which lacks return-type annotation, implicitly has an 'any' return type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt index d81e3e3840..e665d38fce 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInAmbientClass.errors.txt @@ -7,7 +7,7 @@ // Implicit-'any' errors for x. public pub_f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f3(x: any): void; @@ -15,43 +15,43 @@ // Implicit-'any' errors for x, y, and z. public pub_f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. public pub_f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. public pub_f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. public pub_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. public pub_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. public pub_f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f9: () => string; @@ -59,35 +59,35 @@ // Implicit-'any' error for x. public pub_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. public pub_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. public pub_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. public pub_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. /////////////////////////////////////////// @@ -123,33 +123,33 @@ // Implicit-'any' error for x. private priv_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. private priv_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. private priv_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. private priv_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. private priv_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt index 905ea1ac9f..fa14a27631 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInAmbientFunctions.errors.txt @@ -6,7 +6,7 @@ // Implicit-'any' errors for x. declare function d_f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. declare function d_f3(x: any): void; @@ -14,43 +14,43 @@ // Implicit-'any' errors for x, y, and z. declare function d_f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. declare function d_f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. declare function d_f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. declare function d_f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. declare function d_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. declare function d_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. declare function d_f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. declare var d_f9: () => string; @@ -58,32 +58,32 @@ // Implicit-'any' error for x. declare var d_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. declare var d_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. declare var d_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. declare var d_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. declare var d_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt index 99779ab769..8042abf75e 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInAmbientModule.errors.txt @@ -7,7 +7,7 @@ // No implicit-'any' errors. function dm_f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. function dm_f3(x: any): void; @@ -15,43 +15,43 @@ // No implicit-'any' errors. function dm_f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. function dm_f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. function dm_f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // No implicit-'any' errors. function dm_f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // No implicit-'any' errors. function dm_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. function dm_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function dm_f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f9: () => string; @@ -59,33 +59,33 @@ // No implicit-'any' errors. var dm_f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // No implicit-'any' errors. var dm_f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // No implicit-'any' errors. var dm_f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt index ed49e1dbd1..cd881c6c48 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.errors.txt @@ -6,7 +6,7 @@ // Implicit-'any' error for x. function f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. function f3(x: any): void { } @@ -14,43 +14,43 @@ // Implicit-'any' errors for x, y, and z. function f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. function f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. function f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. function f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. function f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. function f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. var f9 = () => ""; @@ -58,32 +58,32 @@ // Implicit-'any' errors for x. var f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. var f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. var f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. var f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. var f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt index 785ebe83b8..2ae9ed1041 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInClass.errors.txt @@ -7,7 +7,7 @@ // Implicit-'any' errors for x. public pub_f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f3(x: any): void { } @@ -15,43 +15,43 @@ // Implicit-'any' errors for x, y, and z. public pub_f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. public pub_f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. public pub_f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. public pub_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. public pub_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. public pub_f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. public pub_f9 = () => ""; @@ -59,35 +59,35 @@ // Implicit-'any' errors for x. public pub_f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. public pub_f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. public pub_f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. public pub_f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. public pub_f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. /////////////////////////////////////////// @@ -97,7 +97,7 @@ // Implicit-'any' errors for x. private priv_f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. private priv_f3(x: any): void { } @@ -105,43 +105,43 @@ // Implicit-'any' errors for x, y, and z. private priv_f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. private priv_f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. private priv_f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. private priv_f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. private priv_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. private priv_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. private priv_f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. private priv_f9 = () => ""; @@ -149,33 +149,33 @@ // Implicit-'any' errors for x. private priv_f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. private priv_f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. private priv_f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. private priv_f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. private priv_f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt index c9bece5767..8d0c165f26 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInInterface.errors.txt @@ -4,17 +4,17 @@ // Implicit-'any' errors for first two call signatures, x1, x2, z2. (); ~~~ -!!! Call signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type. (x1); ~~~~~ -!!! Call signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7020: Call signature, which lacks return-type annotation, implicitly has an 'any' return type. ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. (x2, y2: string, z2): any; ~~ -!!! Parameter 'x2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x2' implicitly has an 'any' type. ~~ -!!! Parameter 'z2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z2' implicitly has an 'any' type. // No implicit-'any' errors. f1(): void; @@ -22,7 +22,7 @@ // Implicit-'any' errors for x. f2(x): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. f3(x: any): void; @@ -30,43 +30,43 @@ // Implicit-'any' errors for x, y, and z. f4(x, y, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x, and z. f5(x, y: any, z): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. f6(...r): void; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. f7(x, ...r): void; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. f8(x3, y3): any; ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. f9: () => string; @@ -74,33 +74,33 @@ // Implicit-'any' errors for x. f10: (x) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. f11: (x, y, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. f12: (x, y: any, z) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. f13: (...r) => string; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x, r. f14: (x, ...r) => string; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt b/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt index 87912f0dcf..a058f8f555 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt +++ b/tests/baselines/reference/noImplicitAnyParametersInModule.errors.txt @@ -7,7 +7,7 @@ // Implicit-'any' error for x. function m_f2(x): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // No implicit-'any' errors. function m_f3(x: any): void { } @@ -15,43 +15,43 @@ // Implicit-'any' errors for x, y, and z. function m_f4(x, y, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. function m_f5(x, y: any, z): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' error for r. function m_f6(...r): void { } ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x and r. function m_f7(x, ...r): void { } ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any' errors for x1, y2, x3, and y3. function m_f8(x1, y1: number): any; ~~ -!!! Parameter 'x1' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x1' implicitly has an 'any' type. function m_f8(x2: string, y2): any; ~~ -!!! Parameter 'y2' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y2' implicitly has an 'any' type. function m_f8(x3, y3): any { } ~~ -!!! Parameter 'x3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x3' implicitly has an 'any' type. ~~ -!!! Parameter 'y3' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y3' implicitly has an 'any' type. // No implicit-'any' errors. var m_f9 = () => ""; @@ -59,33 +59,33 @@ // Implicit-'any' error for x. var m_f10 = (x) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. // Implicit-'any' errors for x, y, and z. var m_f11 = (x, y, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'y' implicitly has an 'any' type. +!!! error TS7006: Parameter 'y' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any' errors for x and z. var m_f12 = (x, y: any, z) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~ -!!! Parameter 'z' implicitly has an 'any' type. +!!! error TS7006: Parameter 'z' implicitly has an 'any' type. // Implicit-'any[]' errors for r. var m_f13 = (...r) => ""; ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. // Implicit-'any'/'any[]' errors for x and r. var m_f14 = (x, ...r) => ""; ~ -!!! Parameter 'x' implicitly has an 'any' type. +!!! error TS7006: Parameter 'x' implicitly has an 'any' type. ~~~~ -!!! Rest parameter 'r' implicitly has an 'any[]' type. +!!! error TS7019: Rest parameter 'r' implicitly has an 'any[]' type. } \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt b/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt index b3dce9b2f7..e005e29c95 100644 --- a/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt +++ b/tests/baselines/reference/noImplicitAnyReferencingDeclaredInterface.errors.txt @@ -4,7 +4,7 @@ // Should return error for implicit any. new (); ~~~~~~~ -!!! Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7013: Construct signature, which lacks return-type annotation, implicitly has an 'any' return type. } declare var x: Entry; \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt index c19ff9f396..58c9406959 100644 --- a/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt +++ b/tests/baselines/reference/noImplicitAnyStringIndexerOnObject.errors.txt @@ -2,4 +2,4 @@ var x = {}["hello"]; ~~~~~~~~~~~ -!!! Index signature of object type implicitly has an 'any' type. \ No newline at end of file +!!! error TS7017: Index signature of object type implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt b/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt index 490d3e41cf..5d3b8fa573 100644 --- a/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt +++ b/tests/baselines/reference/noImplicitAnyWithOverloads.errors.txt @@ -2,17 +2,17 @@ interface A { foo; ~~~~ -!!! Member 'foo' implicitly has an 'any' type. +!!! error TS7008: Member 'foo' implicitly has an 'any' type. } interface B { } function callb(lam: (l: A) => void); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. function callb(lam: (n: B) => void); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'callb', which lacks return-type annotation, implicitly has an 'any' return type. +!!! error TS7010: 'callb', which lacks return-type annotation, implicitly has an 'any' return type. function callb(a) { } ~ -!!! Parameter 'a' implicitly has an 'any' type. +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. callb((a) => { a.foo; }); // error, chose first overload \ No newline at end of file diff --git a/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt b/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt index 949364d138..e2a320d3e0 100644 --- a/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt +++ b/tests/baselines/reference/noTypeArgumentOnReturnType1.errors.txt @@ -3,7 +3,7 @@ foo(): A{ ~ -!!! Generic type 'A' requires 1 type argument(s). +!!! error TS2314: Generic type 'A' requires 1 type argument(s). return null; } } \ No newline at end of file diff --git a/tests/baselines/reference/nonArrayRestArgs.errors.txt b/tests/baselines/reference/nonArrayRestArgs.errors.txt index 7262e0a92a..d70e5f8c1f 100644 --- a/tests/baselines/reference/nonArrayRestArgs.errors.txt +++ b/tests/baselines/reference/nonArrayRestArgs.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/nonArrayRestArgs.ts (1 errors) ==== function foo(...rest: number) { // error ~~~~~~~~~~~~~~~ -!!! A rest parameter must be of an array type. +!!! error TS2370: A rest parameter must be of an array type. var x: string = rest[0]; return x; } \ No newline at end of file diff --git a/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt b/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt index e7d301b6ed..26f1a91ad2 100644 --- a/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt +++ b/tests/baselines/reference/nonContextuallyTypedLogicalOr.errors.txt @@ -16,4 +16,4 @@ // needs to be a supertype of the LHS to win as the best common type. (c || e).dummy; ~~~~~ -!!! Property 'dummy' does not exist on type '{}'. \ No newline at end of file +!!! error TS2339: Property 'dummy' does not exist on type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt b/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt index f4f1fe043e..0dfcb1948b 100644 --- a/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt +++ b/tests/baselines/reference/nonExportedElementsOfMergedModules.errors.txt @@ -13,7 +13,7 @@ } B.x; ~ -!!! Property 'x' does not exist on type 'typeof B'. +!!! error TS2339: Property 'x' does not exist on type 'typeof B'. B.y; } \ No newline at end of file diff --git a/tests/baselines/reference/nullAssignedToUndefined.errors.txt b/tests/baselines/reference/nullAssignedToUndefined.errors.txt index 964fec0d3b..30e0eb8c4a 100644 --- a/tests/baselines/reference/nullAssignedToUndefined.errors.txt +++ b/tests/baselines/reference/nullAssignedToUndefined.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignedToUndefined.ts (1 errors) ==== var x = undefined = null; // error ~~~~~~~~~ -!!! Invalid left-hand side of assignment expression. +!!! error TS2364: Invalid left-hand side of assignment expression. var y: typeof undefined = null; // ok, widened \ No newline at end of file diff --git a/tests/baselines/reference/nullKeyword.errors.txt b/tests/baselines/reference/nullKeyword.errors.txt index ab3616d777..77ca69ad64 100644 --- a/tests/baselines/reference/nullKeyword.errors.txt +++ b/tests/baselines/reference/nullKeyword.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/nullKeyword.ts (1 errors) ==== null.foo; ~~~ -!!! Property 'foo' does not exist on type 'null'. \ No newline at end of file +!!! error TS2339: Property 'foo' does not exist on type 'null'. \ No newline at end of file diff --git a/tests/baselines/reference/numLit.errors.txt b/tests/baselines/reference/numLit.errors.txt index 97c80e6567..6e9b09df14 100644 --- a/tests/baselines/reference/numLit.errors.txt +++ b/tests/baselines/reference/numLit.errors.txt @@ -3,7 +3,7 @@ 1.0.toString(); 1.toString(); ~~~~~~~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~~~ -!!! Cannot find name 'toString'. +!!! error TS2304: Cannot find name 'toString'. 1.+2.0 + 3. ; \ No newline at end of file diff --git a/tests/baselines/reference/numberToString.errors.txt b/tests/baselines/reference/numberToString.errors.txt index 5d7a636f5f..c7909abe4c 100644 --- a/tests/baselines/reference/numberToString.errors.txt +++ b/tests/baselines/reference/numberToString.errors.txt @@ -2,7 +2,7 @@ function f1(n:number):string { return n; // error return type mismatch ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. } function f2(s:string):void { @@ -11,6 +11,6 @@ f1(3); f2(3); // error no coercion to string ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. f2(3+""); // ok + operator promotes \ No newline at end of file diff --git a/tests/baselines/reference/numericClassMembers1.errors.txt b/tests/baselines/reference/numericClassMembers1.errors.txt index 160c6e8820..a23329e75c 100644 --- a/tests/baselines/reference/numericClassMembers1.errors.txt +++ b/tests/baselines/reference/numericClassMembers1.errors.txt @@ -3,14 +3,14 @@ 0 = 1; 0.0 = 2; ~~~ -!!! Duplicate identifier '0.0'. +!!! error TS2300: Duplicate identifier '0.0'. } class C235 { 0.0 = 1; '0' = 2; ~~~ -!!! Duplicate identifier ''0''. +!!! error TS2300: Duplicate identifier ''0''. } class C236 { diff --git a/tests/baselines/reference/numericIndexExpressions.errors.txt b/tests/baselines/reference/numericIndexExpressions.errors.txt index b471b45c7d..95b2a171c2 100644 --- a/tests/baselines/reference/numericIndexExpressions.errors.txt +++ b/tests/baselines/reference/numericIndexExpressions.errors.txt @@ -10,15 +10,15 @@ var x: Numbers1; x[1] = 4; // error ~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. x['1'] = 4; // error ~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var y: Strings1; y['1'] = 4; // should be error ~~~~~~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. y[1] = 4; // should be error ~~~~ -!!! Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt index 1a74ee3780..2c08d9fbc1 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt @@ -18,23 +18,23 @@ 1.0: string; // ok 2.0: number; // error ~~~~~~~~~~~~ -!!! Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. "3.0": string; // ok "4.0": number; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. 3.0: MyNumber // error ~~~~~~~~~~~~~ -!!! Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. get X() { // ok ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } set X(v) { } // ok ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { return ''; @@ -46,7 +46,7 @@ static foo() { } // ok static get X() { // ok ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } } @@ -62,14 +62,14 @@ 1.0: string; // ok 2.0: number; // error ~~~~~~~~~~~~ -!!! Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. (): string; // ok (x): number // ok foo(): string; // ok "3.0": string; // ok "4.0": number; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. f: MyNumber; // error } @@ -84,23 +84,23 @@ 1.0: string; // ok 2.0: number; // error ~~~~~~~~~~~~ -!!! Property '2.0' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. (): string; // ok (x): number // ok foo(): string; // ok "3.0": string; // ok "4.0": number; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. +!!! error TS2412: Property '"4.0"' of type 'number' is not assignable to numeric index type 'string'. f: MyNumber; // error } // error var b: { [x: number]: string; } = { ~ -!!! Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: unknown; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }': -!!! Index signatures are incompatible: -!!! Type '{}' is not assignable to type 'string'. +!!! error TS2322: Type '{ [x: number]: {}; 1.0: string; 2.0: number; a: string; b: number; c: () => void; "d": string; "e": number; "3.0": string; "4.0": number; f: unknown; X: string; foo: () => string; }' is not assignable to type '{ [x: number]: string; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type '{}' is not assignable to type 'string'. a: '', b: 1, c: () => { }, @@ -112,16 +112,16 @@ "4.0": 1, f: null, ~~~ -!!! Cannot find name 'Myn'. +!!! error TS2304: Cannot find name 'Myn'. get X() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; }, set X(v) { }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { return ''; } diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt index 3c21132618..86d67721e2 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.errors.txt @@ -16,10 +16,10 @@ "2.5": B // ok 3.0: number; // error ~~~~~~~~~~~~ -!!! Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. "4.0": string; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. } interface Foo2 { @@ -29,10 +29,10 @@ "2.5": B // ok 3.0: number; // error ~~~~~~~~~~~~ -!!! Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. "4.0": string; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. } var a: { @@ -42,19 +42,19 @@ "2.5": B // ok 3.0: number; // error ~~~~~~~~~~~~ -!!! Property '3.0' of type 'number' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '3.0' of type 'number' is not assignable to numeric index type 'A'. "4.0": string; // error ~~~~~~~~~~~~~~ -!!! Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. +!!! error TS2412: Property '"4.0"' of type 'string' is not assignable to numeric index type 'A'. }; // error var b: { [x: number]: A } = { ~ -!!! Type '{ [x: number]: {}; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }': -!!! Index signatures are incompatible: -!!! Type '{}' is not assignable to type 'A': -!!! Property 'foo' is missing in type '{}'. +!!! error TS2322: Type '{ [x: number]: {}; 1.0: A; 2.0: B; 3.0: number; "2.5": B; "4.0": string; }' is not assignable to type '{ [x: number]: A; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type '{}' is not assignable to type 'A': +!!! error TS2322: Property 'foo' is missing in type '{}'. 1.0: new A(), 2.0: new B(), "2.5": new B(), diff --git a/tests/baselines/reference/numericIndexerConstraint.errors.txt b/tests/baselines/reference/numericIndexerConstraint.errors.txt index 4ff9b00897..a41e26dfa5 100644 --- a/tests/baselines/reference/numericIndexerConstraint.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint.errors.txt @@ -2,6 +2,6 @@ class C { 0: number; ~~~~~~~~~~ -!!! Property '0' of type 'number' is not assignable to numeric index type 'RegExp'. +!!! error TS2412: Property '0' of type 'number' is not assignable to numeric index type 'RegExp'. [x: number]: RegExp; } \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint1.errors.txt b/tests/baselines/reference/numericIndexerConstraint1.errors.txt index 8d615874e4..cb0deaaca8 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint1.errors.txt @@ -3,6 +3,6 @@ var x: { [index: string]: number; }; var result: Foo = x["one"]; // error ~~~~~~ -!!! Type 'number' is not assignable to type 'Foo': -!!! Property 'foo' is missing in type 'Number'. +!!! error TS2322: Type 'number' is not assignable to type 'Foo': +!!! error TS2322: Property 'foo' is missing in type 'Number'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint2.errors.txt b/tests/baselines/reference/numericIndexerConstraint2.errors.txt index 1bd9aea28d..62225b247e 100644 --- a/tests/baselines/reference/numericIndexerConstraint2.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint2.errors.txt @@ -4,5 +4,5 @@ var a: { one: number; }; x = a; ~ -!!! Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }': -!!! Index signature is missing in type '{ one: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }': +!!! error TS2322: Index signature is missing in type '{ one: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerConstraint5.errors.txt b/tests/baselines/reference/numericIndexerConstraint5.errors.txt index 9127b58360..26a8dee271 100644 --- a/tests/baselines/reference/numericIndexerConstraint5.errors.txt +++ b/tests/baselines/reference/numericIndexerConstraint5.errors.txt @@ -2,5 +2,5 @@ var x = { name: "x", 0: new Date() }; var z: { [name: number]: string } = x; ~ -!!! Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }': -!!! Index signature is missing in type '{ 0: Date; name: string; }'. \ No newline at end of file +!!! error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }': +!!! error TS2322: Index signature is missing in type '{ 0: Date; name: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping1.errors.txt b/tests/baselines/reference/numericIndexerTyping1.errors.txt index 5aa0c79435..c42add1104 100644 --- a/tests/baselines/reference/numericIndexerTyping1.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping1.errors.txt @@ -9,9 +9,9 @@ var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! Type 'Date' is not assignable to type 'string'. +!!! error TS2323: Type 'Date' is not assignable to type 'string'. var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexer ~~ -!!! Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'Date' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericIndexerTyping2.errors.txt b/tests/baselines/reference/numericIndexerTyping2.errors.txt index 5d7165dfee..75bba3c983 100644 --- a/tests/baselines/reference/numericIndexerTyping2.errors.txt +++ b/tests/baselines/reference/numericIndexerTyping2.errors.txt @@ -9,9 +9,9 @@ var i: I; var r: string = i[1]; // error: numeric indexer returns the type of the string indexer ~ -!!! Type 'Date' is not assignable to type 'string'. +!!! error TS2323: Type 'Date' is not assignable to type 'string'. var i2: I2; var r2: string = i2[1]; // error: numeric indexer returns the type of the string indexere ~~ -!!! Type 'Date' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2323: Type 'Date' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt index 7ecf5f1582..3e0a45b2e4 100644 --- a/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt +++ b/tests/baselines/reference/numericNamedPropertyDuplicates.errors.txt @@ -3,32 +3,32 @@ 1: number; 1.0: number; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. static 2: number; static 2: number; ~ -!!! Duplicate identifier '2'. +!!! error TS2300: Duplicate identifier '2'. } interface I { 2: number; 2.: number; ~~ -!!! Duplicate identifier '2.'. +!!! error TS2300: Duplicate identifier '2.'. } var a: { 1: number; 1: number; ~ -!!! Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1'. } var b = { 2: 1 2: 1 ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~ -!!! Duplicate identifier '2'. +!!! error TS2300: Duplicate identifier '2'. } \ No newline at end of file diff --git a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt index ddde515f49..c04b2b6c6a 100644 --- a/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt +++ b/tests/baselines/reference/numericStringNamedPropertyEquivalence.errors.txt @@ -6,7 +6,7 @@ "1.0": number; // not a duplicate 1.0: number; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. } interface I { @@ -14,19 +14,19 @@ "1.": number; // not a duplicate 1: number; ~ -!!! Duplicate identifier '1'. +!!! error TS2300: Duplicate identifier '1'. } var a: { "1": number; 1.0: string; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. } var b = { "0": '', 0: '' ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. } \ No newline at end of file diff --git a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt index 6b3788ff53..6a76f08d9c 100644 --- a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt +++ b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt @@ -5,7 +5,7 @@ } function foo(x = new A(123)) { //should error, 123 is not string ~~~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. }} ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt b/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt index d4bafcbc9c..577a3d1bb7 100644 --- a/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt +++ b/tests/baselines/reference/objectCreationOfElementAccessExpression.errors.txt @@ -53,12 +53,12 @@ // ElementAccessExpressions can only contain one expression. There should be a parse error here. var foods = new PetFood[new IceCream('Mint chocolate chip') , Cookie('Chocolate chip', false) , new Cookie('Peanut butter', true)]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An index expression argument must be of type 'string', 'number', or 'any'. +!!! error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? var foods2: MonsterFood[] = new PetFood[new IceCream('Mint chocolate chip') , Cookie('Chocolate chip', false) , new Cookie('Peanut butter', true)]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! An index expression argument must be of type 'string', 'number', or 'any'. +!!! error TS2342: An index expression argument must be of type 'string', 'number', or 'any'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'typeof Cookie' is not callable. Did you mean to include 'new'? \ No newline at end of file diff --git a/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt b/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt index b7d5ae0f61..55ca5a85cf 100644 --- a/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt +++ b/tests/baselines/reference/objectLitArrayDeclNoNew.errors.txt @@ -22,11 +22,11 @@ return { tokens: Gar[],//IToken[], // Missing new. Correct syntax is: tokens: new IToken[] ~ -!!! Expression expected. +!!! error TS1109: Expression expected. endState: state }; } } } ~ -!!! Declaration or statement expected. \ No newline at end of file +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectLitIndexerContextualType.errors.txt b/tests/baselines/reference/objectLitIndexerContextualType.errors.txt index b9d92a7838..4319381783 100644 --- a/tests/baselines/reference/objectLitIndexerContextualType.errors.txt +++ b/tests/baselines/reference/objectLitIndexerContextualType.errors.txt @@ -12,16 +12,16 @@ x = { s: t => t * t, // Should error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. }; x = { 0: t => t * t, // Should error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. }; y = { s: t => t * t, // Should not error @@ -29,7 +29,7 @@ y = { 0: t => t * t, // Should error ~ -!!! The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~ -!!! The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. }; \ No newline at end of file diff --git a/tests/baselines/reference/objectLitPropertyScoping.errors.txt b/tests/baselines/reference/objectLitPropertyScoping.errors.txt index f317de68e7..ef84eaee65 100644 --- a/tests/baselines/reference/objectLitPropertyScoping.errors.txt +++ b/tests/baselines/reference/objectLitPropertyScoping.errors.txt @@ -5,12 +5,12 @@ return { get x() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return x; }, get y() { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return y; }, dist: function () { diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt index 2a3c8d4363..f284302d61 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt @@ -2,5 +2,5 @@ // Shouldn't compile var x: { a: number; } = { b: 5 }; ~ -!!! Type '{ b: number; }' is not assignable to type '{ a: number; }': -!!! Property 'a' is missing in type '{ b: number; }'. \ No newline at end of file +!!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }': +!!! error TS2322: Property 'a' is missing in type '{ b: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt index 2d12916ab2..bf4b809ebf 100644 --- a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt +++ b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt @@ -5,6 +5,6 @@ process({a:true,b:"y"}); ~~~~~~~~~~~~~~ -!!! Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. -!!! Types of property 'a' are incompatible: -!!! Type 'boolean' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2345: Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrors.errors.txt b/tests/baselines/reference/objectLiteralErrors.errors.txt index 6a36b93edb..204a49bb4f 100644 --- a/tests/baselines/reference/objectLiteralErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralErrors.errors.txt @@ -3,167 +3,167 @@ // Multiple properties with the same name var e1 = { a: 0, a: 0 }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e2 = { a: '', a: '' }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e3 = { a: 0, a: '' }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e4 = { a: true, a: false }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e5 = { a: {}, a: {} }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e6 = { a: 0, 'a': 0 }; ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var e7 = { 'a': 0, a: 0 }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var e8 = { 'a': 0, "a": 0 }; ~~~ -!!! Duplicate identifier '"a"'. +!!! error TS2300: Duplicate identifier '"a"'. var e9 = { 'a': 0, 'a': 0 }; ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var e10 = { "a": 0, 'a': 0 }; ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var e11 = { 1.0: 0, '1': 0 }; ~~~ -!!! Duplicate identifier ''1''. +!!! error TS2300: Duplicate identifier ''1''. var e12 = { 0: 0, 0: 0 }; ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var e13 = { 0: 0, 0: 0 }; ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var e14 = { 0: 0, 0x0: 0 }; ~~~ -!!! Duplicate identifier '0x0'. +!!! error TS2300: Duplicate identifier '0x0'. var e14 = { 0: 0, 000: 0 }; ~~~ -!!! Octal literals are not available when targeting ECMAScript 5 and higher. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. ~~~ -!!! Duplicate identifier '000'. +!!! error TS2300: Duplicate identifier '000'. var e15 = { "100": 0, 1e2: 0 }; ~~~ -!!! Duplicate identifier '1e2'. +!!! error TS2300: Duplicate identifier '1e2'. var e16 = { 0x20: 0, 3.2e1: 0 }; ~~~~~ -!!! Duplicate identifier '3.2e1'. +!!! error TS2300: Duplicate identifier '3.2e1'. var e17 = { a: 0, b: 1, a: 0 }; ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. // Accessor and property with the same name var f1 = { a: 0, get a() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f2 = { a: '', get a() { return ''; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f3 = { a: 0, get a() { return ''; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f4 = { a: true, get a() { return false; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f5 = { a: {}, get a() { return {}; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f6 = { a: 0, get 'a'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var f7 = { 'a': 0, get a() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. var f8 = { 'a': 0, get "a"() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '"a"'. +!!! error TS2300: Duplicate identifier '"a"'. var f9 = { 'a': 0, get 'a'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var f10 = { "a": 0, get 'a'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''a''. +!!! error TS2300: Duplicate identifier ''a''. var f11 = { 1.0: 0, get '1'() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier ''1''. +!!! error TS2300: Duplicate identifier ''1''. var f12 = { 0: 0, get 0() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var f13 = { 0: 0, get 0() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. var f14 = { 0: 0, get 0x0() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '0x0'. +!!! error TS2300: Duplicate identifier '0x0'. var f14 = { 0: 0, get 000() { return 0; } }; ~~~ -!!! Octal literals are not available when targeting ECMAScript 5 and higher. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '000'. +!!! error TS2300: Duplicate identifier '000'. var f15 = { "100": 0, get 1e2() { return 0; } }; ~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~ -!!! Duplicate identifier '1e2'. +!!! error TS2300: Duplicate identifier '1e2'. var f16 = { 0x20: 0, get 3.2e1() { return 0; } }; ~~~~~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~~~~~ -!!! Duplicate identifier '3.2e1'. +!!! error TS2300: Duplicate identifier '3.2e1'. var f17 = { a: 0, get b() { return 1; }, get a() { return 0; } }; ~ -!!! An object literal cannot have property and accessor with the same name. +!!! error TS1119: An object literal cannot have property and accessor with the same name. ~ -!!! Duplicate identifier 'a'. +!!! error TS2300: Duplicate identifier 'a'. // Get and set accessor with mismatched type annotations var g1 = { get a(): number { return 4; }, set a(n: string) { } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. ~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. var g2 = { get a() { return 4; }, set a(n: string) { } }; ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var g3 = { get a(): number { return undefined; }, set a(n: string) { } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. ~~~~~~~~~~~~~~~~~~~~ -!!! 'get' and 'set' accessor must have the same type. +!!! error TS2380: 'get' and 'set' accessor must have the same type. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrorsES3.errors.txt b/tests/baselines/reference/objectLiteralErrorsES3.errors.txt index b928d9546a..1140cc8811 100644 --- a/tests/baselines/reference/objectLiteralErrorsES3.errors.txt +++ b/tests/baselines/reference/objectLiteralErrorsES3.errors.txt @@ -2,14 +2,14 @@ var e1 = { get a() { return 4; } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var e2 = { set a(n) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var e3 = { get a() { return ''; }, set a(n) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt index f4eef960bb..c5d84ce02b 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt @@ -8,18 +8,18 @@ f2({ hello: 1 }) // error ~~~~~~~~~~~~ -!!! Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. -!!! Property 'value' is missing in type '{ hello: number; }'. +!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property 'value' is missing in type '{ hello: number; }'. f2({ value: '' }) // missing toString satisfied by Object's member f2({ value: '', what: 1 }) // missing toString satisfied by Object's member f2({ toString: (s) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. -!!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. +!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ toString: (s: string) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. -!!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. +!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ value: '', toString: (s) => s.uhhh }) // error ~~~~ -!!! Property 'uhhh' does not exist on type 'string'. \ No newline at end of file +!!! error TS2339: Property 'uhhh' does not exist on type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt index 3b6995e062..161ff54aa2 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt @@ -8,25 +8,25 @@ f2({ hello: 1 }) ~~~~~~~~~~~~ -!!! Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. -!!! Property 'value' is missing in type '{ hello: number; }'. +!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'value' is missing in type '{ hello: number; }'. f2({ value: '' }) ~~~~~~~~~~~~~ -!!! Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. -!!! Property 'doStuff' is missing in type '{ value: string; }'. +!!! error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; }'. f2({ value: '', what: 1 }) ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. -!!! Property 'doStuff' is missing in type '{ value: string; what: number; }'. +!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; what: number; }'. f2({ toString: (s) => s }) ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. -!!! Property 'value' is missing in type '{ toString: (s: any) => any; }'. +!!! error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: any) => any; }'. f2({ toString: (s: string) => s }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. -!!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. +!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ value: '', toString: (s) => s.uhhh }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. -!!! Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'. \ No newline at end of file +!!! error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. +!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt index 9019cd7246..dff0a370b7 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt @@ -2,34 +2,34 @@ // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; ~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; ~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} var callSig1 = { num(n: number) { return '' } }; @@ -42,58 +42,58 @@ // Get accessor only, type of the property is the annotated return type of the get accessor var getter1 = { get x(): string { return undefined; } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var getter1: { x: string; } // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var getter2: { x: string; } // Set accessor only, type of the property is the param type of the set accessor var setter1 = { set x(n: number) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var setter1: { x: number }; // Set accessor only, type of the property is Any for an unannotated set accessor var setter2 = { set x(n) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var setter2: { x: any }; var anyVar: any; // Get and set accessor with matching type annotations var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. // Type of unannotated get accessor return type is the type annotation of the set accessor param var setParamType1 = { set n(x: (t: string) => void) { }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. get n() { return (t) => { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p: string; var p = t; } @@ -102,35 +102,35 @@ var setParamType2 = { get n() { return (t) => { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p: string; var p = t; } }, set n(x: (t: string) => void) { } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; // Type of unannotated set accessor parameter is the return type annotation of the get accessor var getParamType1 = { set n(x) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y = x; var y: string; }, get n() { return ''; } ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. }; var getParamType2 = { get n() { return ''; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set n(x) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y = x; var y: string; } @@ -140,10 +140,10 @@ var getParamType3 = { get n() { return ''; }, ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set n(x) { ~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y = x; var y: string; } diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt index 019d5c2733..644d927ef8 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt +++ b/tests/baselines/reference/objectLiteralIndexerErrors.errors.txt @@ -13,8 +13,8 @@ var o1: { [s: string]: A;[n: number]: B; } = { x: b, 0: a }; // both indexers are A ~~ -!!! Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }': -!!! Index signatures are incompatible: -!!! Type 'A' is not assignable to type 'B': -!!! Property 'y' is missing in type 'A'. +!!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }': +!!! error TS2322: Index signatures are incompatible: +!!! error TS2322: Type 'A' is not assignable to type 'B': +!!! error TS2322: Property 'y' is missing in type 'A'. o1 = { x: c, 0: a }; // string indexer is any, number indexer is A \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralParameterResolution.errors.txt b/tests/baselines/reference/objectLiteralParameterResolution.errors.txt index 4380a97638..cd033c244e 100644 --- a/tests/baselines/reference/objectLiteralParameterResolution.errors.txt +++ b/tests/baselines/reference/objectLiteralParameterResolution.errors.txt @@ -9,18 +9,18 @@ data: "data" , success: wrapSuccessCallback(requestContext, callback) , ~~~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'wrapSuccessCallback'. +!!! error TS2304: Cannot find name 'wrapSuccessCallback'. ~~~~~~~~~~~~~~ -!!! Cannot find name 'requestContext'. +!!! error TS2304: Cannot find name 'requestContext'. ~~~~~~~~ -!!! Cannot find name 'callback'. +!!! error TS2304: Cannot find name 'callback'. error: wrapErrorCallback(requestContext, errorCallback) , ~~~~~~~~~~~~~~~~~ -!!! Cannot find name 'wrapErrorCallback'. +!!! error TS2304: Cannot find name 'wrapErrorCallback'. ~~~~~~~~~~~~~~ -!!! Cannot find name 'requestContext'. +!!! error TS2304: Cannot find name 'requestContext'. ~~~~~~~~~~~~~ -!!! Cannot find name 'errorCallback'. +!!! error TS2304: Cannot find name 'errorCallback'. dataType: "json" , converters: { "text json": "" }, traditional: true , diff --git a/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt b/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt index c5bffb3466..47aef456af 100644 --- a/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt +++ b/tests/baselines/reference/objectLiteralReferencingInternalProperties.errors.txt @@ -1,4 +1,4 @@ ==== tests/cases/compiler/objectLiteralReferencingInternalProperties.ts (1 errors) ==== var a = { b: 10, c: b }; // Should give error for attempting to reference b. ~ -!!! Cannot find name 'b'. \ No newline at end of file +!!! error TS2304: Cannot find name 'b'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt index 7c3f272c68..ac67bd6fdc 100644 --- a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt +++ b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt @@ -3,7 +3,7 @@ var x = { get _extraOccluded() { ~~~~~~~~~~~~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var occluded = 0; return occluded; }, diff --git a/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt b/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt index cea10abde8..56cf1c3841 100644 --- a/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt +++ b/tests/baselines/reference/objectLiteralWithNumericPropertyName.errors.txt @@ -4,9 +4,9 @@ } var x: A = { ~ -!!! Type '{ 0: number; }' is not assignable to type 'A': -!!! Types of property '0' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '{ 0: number; }' is not assignable to type 'A': +!!! error TS2322: Types of property '0' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. 0: 3 }; \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt index 65b100d9b8..4ff9d1c5c3 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.errors.txt @@ -11,21 +11,21 @@ data: A; [x: string]: Object; ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'data' of type 'A' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'data' of type 'A' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. } class C { diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt index a592cca8f5..ff0a0e26be 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.errors.txt @@ -7,10 +7,10 @@ var o: Object; o = i; // error ~ -!!! Type 'I' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'I' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. i = o; // ok class C { @@ -19,10 +19,10 @@ var c: C; o = c; // error ~ -!!! Type 'C' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. c = o; // ok var a = { @@ -30,8 +30,8 @@ } o = a; // error ~ -!!! Type '{ toString: () => void; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt index 7bfc0894d3..ad4741f609 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.errors.txt @@ -7,16 +7,16 @@ var o: Object; o = i; // error ~ -!!! Type 'I' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => number' is not assignable to type '() => string': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => number' is not assignable to type '() => string': +!!! error TS2322: Type 'number' is not assignable to type 'string'. i = o; // error ~ -!!! Type 'Object' is not assignable to type 'I': -!!! Types of property 'toString' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'Object' is not assignable to type 'I': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => string' is not assignable to type '() => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. class C { toString(): number { return 1; } @@ -24,24 +24,24 @@ var c: C; o = c; // error ~ -!!! Type 'C' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => number' is not assignable to type '() => string': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'C' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => number' is not assignable to type '() => string': +!!! error TS2322: Type 'number' is not assignable to type 'string'. c = o; // error ~ -!!! Type 'Object' is not assignable to type 'C': -!!! Types of property 'toString' are incompatible: -!!! Type '() => string' is not assignable to type '() => number': -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'Object' is not assignable to type 'C': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => string' is not assignable to type '() => number': +!!! error TS2322: Type 'string' is not assignable to type 'number'. var a = { toString: () => { } } o = a; // error ~ -!!! Type '{ toString: () => void; }' is not assignable to type 'Object': -!!! Types of property 'toString' are incompatible: -!!! Type '() => void' is not assignable to type '() => string': -!!! Type 'void' is not assignable to type 'string'. +!!! error TS2322: Type '{ toString: () => void; }' is not assignable to type 'Object': +!!! error TS2322: Types of property 'toString' are incompatible: +!!! error TS2322: Type '() => void' is not assignable to type '() => string': +!!! error TS2322: Type 'void' is not assignable to type 'string'. a = o; // ok \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt b/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt index 9608cf8442..421e5b11a9 100644 --- a/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt +++ b/tests/baselines/reference/objectTypeLiteralSyntax2.errors.txt @@ -2,7 +2,7 @@ var x: { foo: string, ~ -!!! ';' expected. +!!! error TS1005: ';' expected. bar: string } @@ -14,4 +14,4 @@ var z: { foo: string bar: string } ~~~ -!!! ';' expected. \ No newline at end of file +!!! error TS1005: ';' expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index 8fbbcddff0..c330f1f199 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -8,7 +8,7 @@ f = i; i = f; ~ -!!! Type 'Object' is not assignable to type 'I'. +!!! error TS2323: Type 'Object' is not assignable to type 'I'. var a: { (): void @@ -16,4 +16,4 @@ f = a; a = f; ~ -!!! Type 'Object' is not assignable to type '() => void'. \ No newline at end of file +!!! error TS2323: Type 'Object' is not assignable to type '() => void'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt b/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt index cb6bedb217..90076ca1c5 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt +++ b/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.errors.txt @@ -8,7 +8,7 @@ var i: I; var r2: number = i(); ~~~ -!!! Value of type 'I' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'I' is not callable. Did you mean to include 'new'? var r2b: number = new i(); var r2c: (x: any, y?: any) => any = i.apply; @@ -18,6 +18,6 @@ var r4: number = b(); ~~~ -!!! Value of type 'new () => number' is not callable. Did you mean to include 'new'? +!!! error TS2348: Value of type 'new () => number' is not callable. Did you mean to include 'new'? var r4b: number = new b(); var r4c: (x: any, y?: any) => any = b.apply; \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index 9696c68769..7cbf36dbab 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -8,7 +8,7 @@ f = i; i = f; ~ -!!! Type 'Object' is not assignable to type 'I'. +!!! error TS2323: Type 'Object' is not assignable to type 'I'. var a: { new(): any @@ -16,4 +16,4 @@ f = a; a = f; ~ -!!! Type 'Object' is not assignable to type 'new () => any'. \ No newline at end of file +!!! error TS2323: Type 'Object' is not assignable to type 'new () => any'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt index 2049e3c960..489fa58256 100644 --- a/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithDuplicateNumericProperty.errors.txt @@ -6,52 +6,52 @@ 1; 1.0; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.; ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00; ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } interface I { 1; 1.0; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.; ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00; ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } var a: { 1; 1.0; ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.; ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00; ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } var b = { 1: 1, 1.0: 1, ~~~ -!!! Duplicate identifier '1.0'. +!!! error TS2300: Duplicate identifier '1.0'. 1.: 1, ~~ -!!! Duplicate identifier '1.'. +!!! error TS2300: Duplicate identifier '1.'. 1.00: 1 ~~~~ -!!! Duplicate identifier '1.00'. +!!! error TS2300: Duplicate identifier '1.00'. } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt index 21ec31d408..a701c19f88 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty.errors.txt @@ -13,5 +13,5 @@ list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! Type 'List' is not assignable to type 'List': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'List' is not assignable to type 'List': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt index 7e209541a0..92f4ff1929 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedProperty2.errors.txt @@ -13,5 +13,5 @@ list1 = list2; // ok list1 = list3; // error ~~~~~ -!!! Type 'List' is not assignable to type 'List': -!!! Type 'string' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2322: Type 'List' is not assignable to type 'List': +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt index 123a8289f7..7824d4b72a 100644 --- a/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt +++ b/tests/baselines/reference/objectTypeWithRecursiveWrappedPropertyCheckedNominally.errors.txt @@ -20,15 +20,15 @@ list1 = myList1; // error, not nominally equal list1 = myList2; // error, type mismatch ~~~~~ -!!! Type 'MyList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type 'MyList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. list2 = myList1; // error, not nominally equal ~~~~~ -!!! Type 'MyList' is not assignable to type 'List': -!!! Types of property 'data' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'MyList' is not assignable to type 'List': +!!! error TS2322: Types of property 'data' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. list2 = myList2; // error, type mismatch var rList1 = new List>(); @@ -38,10 +38,10 @@ function foo, U extends MyList>(t: T, u: U) { t = u; // error ~ -!!! Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. u = t; // error ~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. var a: List; var b: MyList; @@ -53,23 +53,23 @@ function foo2>(t: T, u: U) { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. t = u; // error ~ -!!! Type 'U' is not assignable to type 'T'. +!!! error TS2323: Type 'U' is not assignable to type 'T'. u = t; // was error, ok after constraint made illegal, doesn't matter ~ -!!! Type 'T' is not assignable to type 'U'. +!!! error TS2323: Type 'T' is not assignable to type 'U'. var a: List; var b: MyList; a = t; // error ~ -!!! Type 'T' is not assignable to type 'List'. +!!! error TS2323: Type 'T' is not assignable to type 'List'. a = u; // error b = t; // ok ~ -!!! Type 'T' is not assignable to type 'MyList'. +!!! error TS2323: Type 'T' is not assignable to type 'MyList'. b = u; // ok } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt index 8d05f4aa45..7675f3d52d 100644 --- a/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt +++ b/tests/baselines/reference/objectTypeWithStringIndexerHidingObjectIndexer.errors.txt @@ -5,19 +5,19 @@ interface Object { [x: string]: Object; ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'constructor' of type 'Function' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'hasOwnProperty' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'isPrototypeOf' of type '(v: Object) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'propertyIsEnumerable' of type '(v: string) => boolean' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toLocaleString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'toString' of type '() => string' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'toString' of type '() => string' is not assignable to string index type 'Object'. ~~~~~~~~~~~~~~~~~~~~ -!!! Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. +!!! error TS2411: Property 'valueOf' of type '() => Object' is not assignable to string index type 'Object'. } var o = {}; var r = o['']; // should be Object diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt index 994ce2a1ce..546f4b1fca 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.errors.txt @@ -21,10 +21,10 @@ function foo4(x: typeof b); ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. function foo4(x: typeof b); // error ~ -!!! Cannot find name 'b'. +!!! error TS2304: Cannot find name 'b'. function foo4(x: any) { } function foo13(x: I); diff --git a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt index c3032d3eac..6bcb3116d0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.errors.txt @@ -6,7 +6,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }>(x: T, y: T): void ~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } interface B { diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt index 3dc6c5f5d3..7c9ecb14ee 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.errors.txt @@ -6,45 +6,45 @@ class A { foo(x: T, y: U): string { return null; } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } class B> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class D { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } interface I { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string; } interface I2 { foo(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { foo>(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { foo(x: T, y: U) { return ''; } }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1(x: A); function foo1(x: A); // error diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt index 8ec2435ba2..0dbf9c0c4e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.errors.txt @@ -15,45 +15,45 @@ class A { foo(x: T, y: U): string { return null; } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } class B { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } class D> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string { return null; } } interface I> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo(x: T, y: U): string; } interface I2 { foo>(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { foo(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { foo(x: T, y: U) { return ''; } }; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1(x: A); function foo1(x: A); // error diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt index 7f1d923565..43192f8354 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.errors.txt @@ -5,40 +5,40 @@ class B> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class D { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } interface I { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. new(x: T, y: U): string; } interface I2 { new(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { new>(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { new(x: T, y: U) { return ''; } }; // not a construct signature, function called new ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1b(x: B, Array>); function foo1b(x: B, Array>); // error diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt index 053dec33b4..8c4834a9fd 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.errors.txt @@ -14,40 +14,40 @@ class B { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class C { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } class D> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. constructor(x: T, y: U) { return null; } } interface I> { ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. new(x: T, y: U): string; } interface I2 { new>(x: T, y: U): string; ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. } var a: { new(x: T, y: U): string } ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var b = { new(x: T, y: U) { return ''; } }; // not a construct signature, function called new ~~~~~~~~~~~ -!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. +!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. function foo1b(x: B); function foo1b(x: B); // error diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt index 72759fbded..63c2ed1188 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt +++ b/tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt @@ -12,7 +12,7 @@ class C { x?: number; // error ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } interface I2 { @@ -22,13 +22,13 @@ class C2 { x?: T; // error ~ -!!! A class member cannot be declared optional. +!!! error TS1112: A class member cannot be declared optional. } var b = { x?: 1 // error ~ -!!! ':' expected. +!!! error TS1005: ':' expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. } \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt b/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt index 75e3b2efc8..93e1ca24fa 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt +++ b/tests/baselines/reference/objectTypesWithOptionalProperties2.errors.txt @@ -4,54 +4,54 @@ var a: { x()?: number; // error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } interface I { x()?: number; // error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } class C { x()?: number; // error ~ -!!! Block or ';' expected. +!!! error TS1144: Block or ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } interface I2 { x()?: T; // error ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } class C2 { x()?: T; // error ~ -!!! Block or ';' expected. +!!! error TS1144: Block or ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~ -!!! Function implementation is missing or not immediately following the declaration. +!!! error TS2391: Function implementation is missing or not immediately following the declaration. } var b = { x()?: 1 // error ~ -!!! '{' expected. +!!! error TS1005: '{' expected. ~ -!!! Property assignment expected. +!!! error TS1136: Property assignment expected. } ~ -!!! ':' expected. \ No newline at end of file +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt index 630f4c2ee7..75be25bdcf 100644 --- a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt +++ b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt @@ -3,20 +3,20 @@ class any { } ~~~ -!!! Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any' class number { } ~~~~~~ -!!! Class name cannot be 'number' +!!! error TS2414: Class name cannot be 'number' class boolean { } ~~~~~~~ -!!! Class name cannot be 'boolean' +!!! error TS2414: Class name cannot be 'boolean' class bool { } // not a predefined type anymore class string { } ~~~~~~ -!!! Class name cannot be 'string' +!!! error TS2414: Class name cannot be 'string' \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt index 0e36e0cdef..4a72ba430c 100644 --- a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt +++ b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName2.errors.txt @@ -3,4 +3,4 @@ class void {} // parse error unlike the others ~~~~ -!!! Identifier expected. \ No newline at end of file +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt b/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt index c282d871af..fba1c1383a 100644 --- a/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt +++ b/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt @@ -2,4 +2,4 @@ "use strict"; 03; ~~ -!!! Octal literals are not allowed in strict mode. \ No newline at end of file +!!! error TS1121: Octal literals are not allowed in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/operatorAddNullUndefined.errors.txt b/tests/baselines/reference/operatorAddNullUndefined.errors.txt index 5accc58a1c..19ab0c53fa 100644 --- a/tests/baselines/reference/operatorAddNullUndefined.errors.txt +++ b/tests/baselines/reference/operatorAddNullUndefined.errors.txt @@ -2,16 +2,16 @@ enum E { x } var x1 = null + null; ~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var x2 = null + undefined; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var x3 = undefined + null; ~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'null' and 'null'. +!!! error TS2365: Operator '+' cannot be applied to types 'null' and 'null'. var x4 = undefined + undefined; ~~~~~~~~~~~~~~~~~~~~~ -!!! Operator '+' cannot be applied to types 'undefined' and 'undefined'. +!!! error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'. var x5 = 1 + null; var x6 = 1 + undefined; var x7 = null + 1; diff --git a/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt b/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt index def37b39fe..7eece462be 100644 --- a/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt +++ b/tests/baselines/reference/optionalArgsWithDefaultValues.errors.txt @@ -1,20 +1,20 @@ ==== tests/cases/compiler/optionalArgsWithDefaultValues.ts (5 errors) ==== function foo(x: number, y?:boolean=false, z?=0) {} ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. class CCC { public foo(x: number, y?:boolean=false, z?=0) {} ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. static foo2(x: number, y?:boolean=false, z?=0) {} ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. } var a = (x?=0) => { return 1; }; ~ -!!! Parameter cannot have question mark and initializer. +!!! error TS1015: Parameter cannot have question mark and initializer. var b = (x, y?:number = 2) => { x; }; ~ -!!! Parameter cannot have question mark and initializer. \ No newline at end of file +!!! error TS1015: Parameter cannot have question mark and initializer. \ No newline at end of file diff --git a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt index 93ddbfa149..21691d6255 100644 --- a/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt +++ b/tests/baselines/reference/optionalFunctionArgAssignability.errors.txt @@ -7,9 +7,9 @@ var b = function then(onFulFill?: (value: number) => U, onReject?: (reason: any) => U): Promise { return null }; a = b; // error because number is not assignable to string ~ -!!! Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise': -!!! Types of parameters 'onFulFill' and 'onFulfill' are incompatible: -!!! Type '(value: number) => any' is not assignable to type '(value: string) => any': -!!! Types of parameters 'value' and 'value' are incompatible: -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type '(onFulFill?: (value: number) => U, onReject?: (reason: any) => U) => Promise' is not assignable to type '(onFulfill?: (value: string) => U, onReject?: (reason: any) => U) => Promise': +!!! error TS2322: Types of parameters 'onFulFill' and 'onFulfill' are incompatible: +!!! error TS2322: Type '(value: number) => any' is not assignable to type '(value: string) => any': +!!! error TS2322: Types of parameters 'value' and 'value' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamArgsTest.errors.txt b/tests/baselines/reference/optionalParamArgsTest.errors.txt index b3be75d6da..9bdca7ae66 100644 --- a/tests/baselines/reference/optionalParamArgsTest.errors.txt +++ b/tests/baselines/reference/optionalParamArgsTest.errors.txt @@ -35,9 +35,9 @@ // "Optional parameters may only be followed by other optional parameters" public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3:number) { return C1M5A1 + C1M5A2; } ~~~~~~ -!!! A required parameter cannot follow an optional parameter. +!!! error TS1016: A required parameter cannot follow an optional parameter. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. } class C2 extends C1 { @@ -103,64 +103,64 @@ // Negative tests - we expect these cases to fail c1o1.C1M1(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M1(1); ~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F1(1); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L1(1); ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M2(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M2(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F2(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L2(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M2(1,2); ~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M2(1,2); ~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F2(1,2); ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L2(1,2); ~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M3(1,2,3); ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M3(1,2,3); ~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F3(1,2,3); ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L3(1,2,3); ~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. c1o1.C1M4(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. i1o1.C1M4(); ~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. F4(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. L4(); ~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. function fnOpt1(id: number, children: number[] = [], expectedPath: number[] = [], isRoot?: boolean): void {} function fnOpt2(id: number, children?: number[], expectedPath?: number[], isRoot?: boolean): void {} diff --git a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt index c79360011d..702704330b 100644 --- a/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt +++ b/tests/baselines/reference/optionalParamAssignmentCompat.errors.txt @@ -10,7 +10,7 @@ var c: I1 = i2.p1; // should be ok var d: I1 = i2.m1; // should error ~ -!!! Type '(p1?: string) => I1' is not assignable to type 'I1': -!!! Types of parameters 'p1' and 'p1' are incompatible: -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2322: Type '(p1?: string) => I1' is not assignable to type 'I1': +!!! error TS2322: Types of parameters 'p1' and 'p1' are incompatible: +!!! error TS2322: Type 'string' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt b/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt index 51c632bded..44df864600 100644 --- a/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt +++ b/tests/baselines/reference/optionalParamReferencingOtherParams2.errors.txt @@ -2,7 +2,7 @@ var a = 1; function strange(x = a, y = b) { ~ -!!! Initializer of parameter 'y' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'b' declared after it. var b = ""; return y; } \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt b/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt index ab344ba4f8..222c5cf721 100644 --- a/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt +++ b/tests/baselines/reference/optionalParamReferencingOtherParams3.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/compiler/optionalParamReferencingOtherParams3.ts (1 errors) ==== function right(a = b, b = a) { ~ -!!! Initializer of parameter 'a' cannot reference identifier 'b' declared after it. +!!! error TS2373: Initializer of parameter 'a' cannot reference identifier 'b' declared after it. a; b; } \ No newline at end of file diff --git a/tests/baselines/reference/optionalParamTypeComparison.errors.txt b/tests/baselines/reference/optionalParamTypeComparison.errors.txt index f80329a5b1..289b09b0d4 100644 --- a/tests/baselines/reference/optionalParamTypeComparison.errors.txt +++ b/tests/baselines/reference/optionalParamTypeComparison.errors.txt @@ -4,11 +4,11 @@ f = g; ~ -!!! Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void': -!!! Types of parameters 'b' and 'n' are incompatible: -!!! Type 'boolean' is not assignable to type 'number'. +!!! error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void': +!!! error TS2322: Types of parameters 'b' and 'n' are incompatible: +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. g = f; ~ -!!! Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void': -!!! Types of parameters 'n' and 'b' are incompatible: -!!! Type 'number' is not assignable to type 'boolean'. \ No newline at end of file +!!! error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void': +!!! error TS2322: Types of parameters 'n' and 'b' are incompatible: +!!! error TS2322: Type 'number' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt index d63270ea0f..a39d68e4e7 100644 --- a/tests/baselines/reference/optionalPropertiesInClasses.errors.txt +++ b/tests/baselines/reference/optionalPropertiesInClasses.errors.txt @@ -10,8 +10,8 @@ class C2 implements ifoo { // ERROR - still need 'y' ~~ -!!! Class 'C2' incorrectly implements interface 'ifoo': -!!! Property 'y' is missing in type 'C2'. +!!! error TS2421: Class 'C2' incorrectly implements interface 'ifoo': +!!! error TS2421: Property 'y' is missing in type 'C2'. public x:number; } diff --git a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt index 348eed0916..5e82198f81 100644 --- a/tests/baselines/reference/optionalPropertiesSyntax.errors.txt +++ b/tests/baselines/reference/optionalPropertiesSyntax.errors.txt @@ -4,7 +4,7 @@ fn(): void; fn?(): void; //err ~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. fn2?(): void; } @@ -13,12 +13,12 @@ (): any; ()?: any; //err ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ?(): any; //err ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. } interface constructSig { @@ -26,9 +26,9 @@ new (): any; new ()?: any; //err ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. new ?(): any; //err } @@ -37,7 +37,7 @@ prop: any; prop?: any; ~~~~ -!!! Duplicate identifier 'prop'. +!!! error TS2300: Duplicate identifier 'prop'. prop2?: any; } @@ -46,19 +46,19 @@ [idx: number]: any; [idx: number]?: any; //err ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. ? [idx: number]: any; //err ~ -!!! Property or signature expected. +!!! error TS1131: Property or signature expected. ~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. [idx?: number]: any; //err ~~~ -!!! An index signature parameter cannot have a question mark. +!!! error TS1019: An index signature parameter cannot have a question mark. ~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate number index signature. +!!! error TS2375: Duplicate number index signature. } \ No newline at end of file diff --git a/tests/baselines/reference/optionalPropertiesTest.errors.txt b/tests/baselines/reference/optionalPropertiesTest.errors.txt index 8068dd5e06..dade906317 100644 --- a/tests/baselines/reference/optionalPropertiesTest.errors.txt +++ b/tests/baselines/reference/optionalPropertiesTest.errors.txt @@ -14,8 +14,8 @@ foo = { id: 1234, name: "test" }; // Ok foo = { name: "test" }; // Error, id missing ~~~ -!!! Type '{ name: string; }' is not assignable to type 'IFoo': -!!! Property 'id' is missing in type '{ name: string; }'. +!!! error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo': +!!! error TS2322: Property 'id' is missing in type '{ name: string; }'. foo = {id: 1234, print:()=>{}} // Ok var s = foo.name || "default"; @@ -28,12 +28,12 @@ var test1: i1 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i1': -!!! Property 'M' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i1': +!!! error TS2322: Property 'M' is missing in type '{}'. var test2: i3 = {}; ~~~~~ -!!! Type '{}' is not assignable to type 'i3': -!!! Property 'M' is missing in type '{}'. +!!! error TS2322: Type '{}' is not assignable to type 'i3': +!!! error TS2322: Property 'M' is missing in type '{}'. var test3: i2 = {}; var test4: i4 = {}; var test5: i1 = { M: function () { } }; @@ -49,5 +49,5 @@ var test10_2: i2; test10_1 = test10_2; ~~~~~~~~ -!!! Type 'i2' is not assignable to type 'i1': -!!! Required property 'M' cannot be reimplemented with optional property in 'i2'. \ No newline at end of file +!!! error TS2322: Type 'i2' is not assignable to type 'i1': +!!! error TS2322: Required property 'M' cannot be reimplemented with optional property in 'i2'. \ No newline at end of file diff --git a/tests/baselines/reference/optionalSetterParam.errors.txt b/tests/baselines/reference/optionalSetterParam.errors.txt index 6f3b39e713..25cd51b640 100644 --- a/tests/baselines/reference/optionalSetterParam.errors.txt +++ b/tests/baselines/reference/optionalSetterParam.errors.txt @@ -3,6 +3,6 @@ public set bar(param?:any) { } ~~~ -!!! Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt index 9ff39d72f4..991caa6276 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -22,6 +22,6 @@ var w: A; var w: C; ~ -!!! Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. w({ s: "", n: 0 }).toLowerCase(); \ No newline at end of file diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt index 82ddd8bcef..c510823d13 100644 --- a/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt +++ b/tests/baselines/reference/overEagerReturnTypeSpecialization.errors.txt @@ -8,8 +8,8 @@ declare var v1: I1; var r1: I1 = v1.func(num => num.toString()) // Correctly returns an I1 ~~ -!!! Type 'I1' is not assignable to type 'I1': -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2322: Type 'I1' is not assignable to type 'I1': +!!! error TS2322: Type 'number' is not assignable to type 'string'. .func(str => str.length); // should error var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1 diff --git a/tests/baselines/reference/overload1.errors.txt b/tests/baselines/reference/overload1.errors.txt index 415a44ebae..6d35d94030 100644 --- a/tests/baselines/reference/overload1.errors.txt +++ b/tests/baselines/reference/overload1.errors.txt @@ -27,24 +27,24 @@ var e:string=x.g(new O.A()); // matches overload but bad assignment ~ -!!! Type 'C' is not assignable to type 'string'. +!!! error TS2323: Type 'C' is not assignable to type 'string'. var y:string=x.f(3); // good y=x.f("nope"); // can't assign number to string ~ -!!! Type 'number' is not assignable to type 'string'. +!!! error TS2323: Type 'number' is not assignable to type 'string'. var z:string=x.g(x.g(3,3)); // good z=x.g(2,2,2); // no match ~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. z=x.g(); // no match ~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. z=x.g(new O.B()); // ambiguous (up and down conversion) ~ -!!! Type 'C' is not assignable to type 'string'. +!!! error TS2323: Type 'C' is not assignable to type 'string'. z=x.h(2,2); // no match ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. z=x.h("hello",0); // good var v=x.g; diff --git a/tests/baselines/reference/overloadAssignmentCompat.errors.txt b/tests/baselines/reference/overloadAssignmentCompat.errors.txt index f5cf4b6a6f..602fd02879 100644 --- a/tests/baselines/reference/overloadAssignmentCompat.errors.txt +++ b/tests/baselines/reference/overloadAssignmentCompat.errors.txt @@ -35,7 +35,7 @@ // error - signatures are not assignment compatible function foo():number; ~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo():string { return "a" }; \ No newline at end of file diff --git a/tests/baselines/reference/overloadModifiersMustAgree.errors.txt b/tests/baselines/reference/overloadModifiersMustAgree.errors.txt index f2aa56b8e4..29fa488286 100644 --- a/tests/baselines/reference/overloadModifiersMustAgree.errors.txt +++ b/tests/baselines/reference/overloadModifiersMustAgree.errors.txt @@ -2,23 +2,23 @@ class baz { public foo(); ~~~ -!!! Overload signatures must all be public or private. +!!! error TS2385: Overload signatures must all be public or private. private foo(bar?: any) { } // error - access modifiers do not agree } declare function bar(); ~~~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. export function bar(s: string); ~~~ -!!! Overload signatures must all be exported or not exported. +!!! error TS2383: Overload signatures must all be exported or not exported. function bar(s?: string) { } interface I { foo? (); foo(s: string); ~~~ -!!! Overload signatures must all be optional or required. +!!! error TS2386: Overload signatures must all be optional or required. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt index 4233620904..06bd2b86d5 100644 --- a/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt +++ b/tests/baselines/reference/overloadOnConstAsTypeAnnotation.errors.txt @@ -1,8 +1,8 @@ ==== tests/cases/compiler/overloadOnConstAsTypeAnnotation.ts (3 errors) ==== var f: (x: 'hi') => number = ('hi') => { return 1; }; ~~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~~~ -!!! A 'return' statement can only be used within a function body. +!!! error TS1108: A 'return' statement can only be used within a function body. ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt b/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt index b64650db42..3f8ad00e76 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.errors.txt @@ -9,7 +9,7 @@ function foo(name: 'bye'): C; function foo(name: string): A; // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. function foo(name: any): Z { return null; } diff --git a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt index 04df57d7fc..579a60f0e1 100644 --- a/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt +++ b/tests/baselines/reference/overloadOnConstDuplicateOverloads1.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/overloadOnConstDuplicateOverloads1.ts (2 errors) ==== function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: any, x: any) { } diff --git a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt index 4124c64355..a6d8a989e1 100644 --- a/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt +++ b/tests/baselines/reference/overloadOnConstInBaseWithBadImplementationInDerived.errors.txt @@ -2,12 +2,12 @@ interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C implements I { x1(a: number, callback: (x: 'hi') => number) { // error ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInCallback1.errors.txt b/tests/baselines/reference/overloadOnConstInCallback1.errors.txt index 40473b6b6a..1cad92f73c 100644 --- a/tests/baselines/reference/overloadOnConstInCallback1.errors.txt +++ b/tests/baselines/reference/overloadOnConstInCallback1.errors.txt @@ -2,7 +2,7 @@ class C { x1(a: number, callback: (x: 'hi') => number); // error ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: any) => number) { callback('hi'); callback('bye'); diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt index 11d35bdedf..64ca57062c 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.errors.txt @@ -2,9 +2,9 @@ interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt index ff965b47a1..8f098d5059 100644 --- a/tests/baselines/reference/overloadOnConstInheritance2.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance2.errors.txt @@ -5,11 +5,11 @@ } interface Deriver extends Base { ~~~~~~~ -!!! Interface 'Deriver' incorrectly extends interface 'Base': -!!! Types of property 'addEventListener' are incompatible: -!!! Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. +!!! error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'addEventListener' are incompatible: +!!! error TS2429: Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'. addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt index cbfd32b1d6..2641ca3a2b 100644 --- a/tests/baselines/reference/overloadOnConstInheritance3.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance3.errors.txt @@ -4,15 +4,15 @@ } interface Deriver extends Base { ~~~~~~~ -!!! Interface 'Deriver' incorrectly extends interface 'Base': -!!! Types of property 'addEventListener' are incompatible: -!!! Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. +!!! error TS2429: Interface 'Deriver' incorrectly extends interface 'Base': +!!! error TS2429: Types of property 'addEventListener' are incompatible: +!!! error TS2429: Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'. // shouldn't need to redeclare the string overload addEventListener(x: 'bar'): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. addEventListener(x: 'foo'): string; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstInheritance4.errors.txt b/tests/baselines/reference/overloadOnConstInheritance4.errors.txt index f2debeac4f..379aeaf526 100644 --- a/tests/baselines/reference/overloadOnConstInheritance4.errors.txt +++ b/tests/baselines/reference/overloadOnConstInheritance4.errors.txt @@ -2,15 +2,15 @@ interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C implements I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: 'hi') => number) { ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt index ad3dc56a7f..81fedf8a18 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/overloadOnConstNoAnyImplementation.ts (4 errors) ==== function x1(a: number, cb: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x1(a: number, cb: (x: 'bye') => number); ~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x1(a: number, cb: (x: string) => number) { cb('hi'); cb('bye'); @@ -13,12 +13,12 @@ cb('uh'); cb(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } var cb: (number) => number = (x: number) => 1; x1(1, cb); x1(1, (x: 'hi') => 1); // error ~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. x1(1, (x: string) => 1); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index 201165a56e..173b3f378f 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -2,13 +2,13 @@ interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: string) => number) { callback('hi'); callback('bye'); @@ -16,17 +16,17 @@ callback(hm); callback(1); // error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. } } var c: C; c.x1(1, (x: 'hi') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt index 73c954ef10..afd6ef4297 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.errors.txt @@ -2,7 +2,7 @@ class C { x1(a: 'hi'); // error, no non-specialized signature in overload list ~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt index 8ac0806a49..918f278001 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.errors.txt @@ -1,10 +1,10 @@ ==== tests/cases/compiler/overloadOnConstNoStringImplementation.ts (3 errors) ==== function x2(a: number, cb: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x2(a: number, cb: (x: 'bye') => number); ~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function x2(a: number, cb: (x: any) => number) { cb('hi'); cb('bye'); @@ -18,5 +18,5 @@ x2(1, cb); // error x2(1, (x: 'hi') => 1); // error ~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. x2(1, (x: string) => 1); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt index f7fdeed169..42410647ed 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.errors.txt @@ -2,13 +2,13 @@ interface I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. } class C implements I { x1(a: number, callback: (x: 'hi') => number); ~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. x1(a: number, callback: (x: any) => number) { callback('hi'); callback('bye'); @@ -21,9 +21,9 @@ var c: C; c.x1(1, (x: 'hi') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x: 'bye') => { return 1; } ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. c.x1(1, (x: string) => { return 1; } ); c.x1(1, (x: number) => { return 1; } ); \ No newline at end of file diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt index 1369843e9b..0435e07b40 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt @@ -6,15 +6,15 @@ function foo(name: "SPAN"): Derived1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(name: "DIV"): Derived2 { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return null; ~~~~~~~~~~~~~~~~ } ~ -!!! A signature with an implementation cannot use a string literal type. +!!! error TS2381: A signature with an implementation cannot use a string literal type. foo("HI"); ~~~~ -!!! Argument of type 'string' is not assignable to parameter of type '"SPAN"'. \ No newline at end of file +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"SPAN"'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolution.errors.txt b/tests/baselines/reference/overloadResolution.errors.txt index a5d0a02969..242bcd75b5 100644 --- a/tests/baselines/reference/overloadResolution.errors.txt +++ b/tests/baselines/reference/overloadResolution.errors.txt @@ -27,7 +27,7 @@ // No candidate overloads found fn1({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments function fn2(s: string, n: number): number; @@ -43,7 +43,7 @@ // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments fn2('', 0); // Error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments fn2('', 0); // OK @@ -67,7 +67,7 @@ // Generic overloads with differing arity called with type argument count that doesn't match any overload fn3(); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. // Generic overloads with constraints called with type arguments that satisfy the constraints function fn4(n: T, m: U); @@ -76,23 +76,23 @@ fn4('', 3); fn4(3, ''); // Error ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. fn4('', 3); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. fn4(3, ''); ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that satisfy the constraints fn4('', 3); @@ -103,17 +103,17 @@ // Generic overloads with constraints called with type arguments that do not satisfy the constraints fn4(null, null); // Error ~~~~~~~ -!!! Type 'boolean' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'boolean' does not satisfy the constraint 'string'. ~~~~ -!!! Type 'Date' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'Date' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4(true, null); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. fn4(null, true); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors function fn5(f: (n: string) => void): string; @@ -121,9 +121,9 @@ function fn5() { return undefined; } var n = fn5((n) => n.toFixed()); ~ -!!! Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. ~~~~~~~ -!!! Property 'toFixed' does not exist on type 'string'. +!!! error TS2339: Property 'toFixed' does not exist on type 'string'. var s = fn5((n) => n.substr(0)); \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt index 389ae265c3..b52f91f3c5 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt @@ -27,7 +27,7 @@ // No candidate overloads found new fn1({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments class fn2 { @@ -62,16 +62,16 @@ // Generic overloads with differing arity called with type arguments matching each overload type parameter count new fn3(4); // Error ~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. new fn3('', '', ''); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. new fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload new fn3(); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. // Generic overloads with constraints called with type arguments that satisfy the constraints class fn4 { @@ -81,44 +81,44 @@ new fn4('', 3); new fn4(3, ''); // Error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', 3); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. new fn4(3, ''); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that satisfy the constraints new fn4('', 3); new fn4(3, ''); // Error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4(3, undefined); // Error ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', null); // Generic overloads with constraints called with type arguments that do not satisfy the constraints new fn4(null, null); // Error ~~~~~~~ -!!! Type 'boolean' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'boolean' does not satisfy the constraint 'string'. ~~~~ -!!! Type 'Date' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'Date' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. new fn4(null, true); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. // Non - generic overloads where contextual typing of function arguments has errors class fn5 { @@ -128,11 +128,11 @@ } new fn5((n) => n.toFixed()); ~~~~~~~ -!!! Property 'toFixed' does not exist on type 'string'. +!!! error TS2339: Property 'toFixed' does not exist on type 'string'. new fn5((n) => n.substr(0)); new fn5((n) => n.blah); // Error ~~~~ -!!! Property 'blah' does not exist on type 'string'. +!!! error TS2339: Property 'blah' does not exist on type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionConstructors.errors.txt b/tests/baselines/reference/overloadResolutionConstructors.errors.txt index 96dd65c071..ee9f650f5a 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionConstructors.errors.txt @@ -27,7 +27,7 @@ // No candidate overloads found new fn1({}); // Error ~~ -!!! Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments interface fn2 { @@ -45,7 +45,7 @@ // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments new fn2('', 0); // Error ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments new fn2('', 0); // OK @@ -71,7 +71,7 @@ // Generic overloads with differing arity called with type argument count that doesn't match any overload new fn3(); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. // Generic overloads with constraints called with type arguments that satisfy the constraints interface fn4 { @@ -83,23 +83,23 @@ new fn4('', 3); new fn4(3, ''); // Error ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~ -!!! Argument of type 'number' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', 3); // Error ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument of type 'string' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. new fn4(3, ''); ~~~~~~ -!!! Type 'number' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. ~~~~~~ -!!! Type 'string' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that satisfy the constraints new fn4('', 3); @@ -110,17 +110,17 @@ // Generic overloads with constraints called with type arguments that do not satisfy the constraints new fn4(null, null); // Error ~~~~~~~ -!!! Type 'boolean' does not satisfy the constraint 'string'. +!!! error TS2344: Type 'boolean' does not satisfy the constraint 'string'. ~~~~ -!!! Type 'Date' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'Date' does not satisfy the constraint 'number'. // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. new fn4(null, true); // Error ~~~~ -!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. +!!! error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors interface fn5 { @@ -130,8 +130,8 @@ var fn5: fn5; var n = new fn5((n) => n.toFixed()); ~ -!!! Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. ~~~~~~~ -!!! Property 'toFixed' does not exist on type 'string'. +!!! error TS2339: Property 'toFixed' does not exist on type 'string'. var s = new fn5((n) => n.substr(0)); \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt index c993514081..f51dc66f76 100644 --- a/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt +++ b/tests/baselines/reference/overloadResolutionOnDefaultConstructor1.errors.txt @@ -3,6 +3,6 @@ public clone() { return new Bar(0); ~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. } } \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt b/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt index bd11102dfd..c850d95922 100644 --- a/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt +++ b/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt @@ -2,4 +2,4 @@ function foo(b: (item: number) => boolean) { } foo(a => a); // can not convert (number)=>bool to (number)=>number ~~~~~~ -!!! Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'. \ No newline at end of file +!!! error TS2345: Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionTest1.errors.txt b/tests/baselines/reference/overloadResolutionTest1.errors.txt index c8b65902d2..5eec017f5e 100644 --- a/tests/baselines/reference/overloadResolutionTest1.errors.txt +++ b/tests/baselines/reference/overloadResolutionTest1.errors.txt @@ -8,10 +8,10 @@ var x11 = foo([{a:0}]); // works var x111 = foo([{a:"s"}]); // error - does not match any signature ~~~~~~~~~ -!!! Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. -!!! Type '{ a: string; }' is not assignable to type '{ a: boolean; }': -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2345: Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. +!!! error TS2345: Type '{ a: string; }' is not assignable to type '{ a: boolean; }': +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'boolean'. var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string @@ -24,9 +24,9 @@ var x3 = foo2({a:true}); // works var x4 = foo2({a:"s"}); // error ~~~~~~~ -!!! Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. -!!! Types of property 'a' are incompatible: -!!! Type 'string' is not assignable to type 'boolean'. +!!! error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'string' is not assignable to type 'boolean'. function foo4(bar:{a:number;}):number; @@ -34,6 +34,6 @@ function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error ~~~~~~~~ -!!! Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. -!!! Types of property 'a' are incompatible: -!!! Type 'boolean' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2345: Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. +!!! error TS2345: Types of property 'a' are incompatible: +!!! error TS2345: Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants1.errors.txt b/tests/baselines/reference/overloadingOnConstants1.errors.txt index f523160803..887ac86097 100644 --- a/tests/baselines/reference/overloadingOnConstants1.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants1.errors.txt @@ -22,17 +22,17 @@ // these are errors var htmlElement2: Derived1 = d2.createElement("yo") ~~~~~~~~~~~~ -!!! Type 'Base' is not assignable to type 'Derived1': -!!! Property 'bar' is missing in type 'Base'. +!!! error TS2322: Type 'Base' is not assignable to type 'Derived1': +!!! error TS2322: Property 'bar' is missing in type 'Base'. var htmlCanvasElement2: Derived3 = d2.createElement("canvas"); ~~~~~~~~~~~~~~~~~~ -!!! Type 'Derived1' is not assignable to type 'Derived3': -!!! Property 'biz' is missing in type 'Derived1'. +!!! error TS2322: Type 'Derived1' is not assignable to type 'Derived3': +!!! error TS2322: Property 'biz' is missing in type 'Derived1'. var htmlDivElement2: Derived1 = d2.createElement("div"); ~~~~~~~~~~~~~~~ -!!! Type 'Derived2' is not assignable to type 'Derived1': -!!! Property 'bar' is missing in type 'Derived2'. +!!! error TS2322: Type 'Derived2' is not assignable to type 'Derived1': +!!! error TS2322: Property 'bar' is missing in type 'Derived2'. var htmlSpanElement2: Derived1 = d2.createElement("span"); ~~~~~~~~~~~~~~~~ -!!! Type 'Derived3' is not assignable to type 'Derived1': -!!! Property 'bar' is missing in type 'Derived3'. \ No newline at end of file +!!! error TS2322: Type 'Derived3' is not assignable to type 'Derived1': +!!! error TS2322: Property 'bar' is missing in type 'Derived3'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants2.errors.txt b/tests/baselines/reference/overloadingOnConstants2.errors.txt index a79428f70b..1d292451f5 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -8,10 +8,10 @@ } function foo(x: "hi", items: string[]): D; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: "bye", items: string[]): E; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(x: string, items: string[]): C { return null; } @@ -19,13 +19,13 @@ var b: E = foo("bye", []); // E var c = foo("um", []); // error ~~~~ -!!! Argument of type 'string' is not assignable to parameter of type '"bye"'. +!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"bye"'. //function bar(x: "hi", items: string[]): D; function bar(x: "bye", items: string[]): E; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function bar(x: string, items: string[]): C; function bar(x: string, items: string[]): C { return null; diff --git a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt b/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt index 6313010ef8..e5eec48abb 100644 --- a/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt +++ b/tests/baselines/reference/overloadingOnConstantsInImplementation.errors.txt @@ -1,12 +1,12 @@ ==== tests/cases/compiler/overloadingOnConstantsInImplementation.ts (3 errors) ==== function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Specialized overload signature is not assignable to any non-specialized signature. +!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature. function foo(a: 'hi', x: any) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } ~ -!!! A signature with an implementation cannot use a string literal type. \ No newline at end of file +!!! error TS2381: A signature with an implementation cannot use a string literal type. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt index 2d8832f67d..e9903abf4c 100644 --- a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt +++ b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt @@ -1,34 +1,34 @@ ==== tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts (14 errors) ==== function boo { ~ -!!! '(' expected. +!!! error TS1005: '(' expected. static test() ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~~~~ -!!! Cannot find name 'test'. +!!! error TS2304: Cannot find name 'test'. static test(name:string) ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~ -!!! ',' expected. +!!! error TS1005: ',' expected. ~~~~ -!!! Cannot find name 'test'. +!!! error TS2304: Cannot find name 'test'. ~~~~ -!!! Cannot find name 'name'. +!!! error TS2304: Cannot find name 'name'. ~~~~~~ -!!! Cannot find name 'string'. +!!! error TS2304: Cannot find name 'string'. static test(name?:any){ } ~~~~~~ -!!! Statement expected. +!!! error TS1129: Statement expected. ~ -!!! Expression expected. +!!! error TS1109: Expression expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~~~~ -!!! Cannot find name 'test'. +!!! error TS2304: Cannot find name 'test'. ~~~~ -!!! Cannot find name 'name'. +!!! error TS2304: Cannot find name 'name'. ~~~ -!!! Cannot find name 'any'. +!!! error TS2304: Cannot find name 'any'. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index 58472a4141..756566a630 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -14,25 +14,25 @@ var result: number = foo(x => new G(x)); // No error, returns number ~~~~~~ -!!! Type 'string' is not assignable to type 'number'. +!!! error TS2323: Type 'string' is not assignable to type 'number'. ~ -!!! Argument of type 'D' is not assignable to parameter of type 'A'. +!!! error TS2345: Argument of type 'D' is not assignable to parameter of type 'A'. var result2: number = foo(x => new G(x)); // No error, returns number ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. ~~~~~~~~ -!!! Type 'D' does not satisfy the constraint 'A'. +!!! error TS2344: Type 'D' does not satisfy the constraint 'A'. var result3: string = foo(x => { // returns string because the C overload is picked ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var y: G; // error that C does not satisfy constraint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ -!!! Type 'D' does not satisfy the constraint 'A'. +!!! error TS2344: Type 'D' does not satisfy the constraint 'A'. return y; ~~~~~~~~~~~~~ }); ~ -!!! Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2345: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt index 3b9543f50c..bebbfaece8 100644 --- a/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt +++ b/tests/baselines/reference/overloadsAndTypeArgumentArityErrors.errors.txt @@ -5,9 +5,9 @@ Callbacks('s'); // wrong number of type arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. new Callbacks('s'); // wrong number of type arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Supplied parameters do not match any signature of call target. +!!! error TS2346: Supplied parameters do not match any signature of call target. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Only a void function can be called with the 'new' keyword. \ No newline at end of file +!!! error TS2350: Only a void function can be called with the 'new' keyword. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt index 06bd4d0f62..fa0bf9109f 100644 --- a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt +++ b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.errors.txt @@ -7,5 +7,5 @@ module M { export function f() { } ~ -!!! Overload signatures must all be ambient or non-ambient. +!!! error TS2384: Overload signatures must all be ambient or non-ambient. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt index 2e44fc1df6..983089d5c2 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt @@ -6,12 +6,12 @@ func(s => ({})); // Error for no applicable overload (object type is missing a and b) ~~~~~~~~~ -!!! Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. +!!! error TS2345: Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. func(s => ({ a: blah, b: 3 })); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error) ~~~~ -!!! Cannot find name 'blah'. +!!! error TS2304: Cannot find name 'blah'. func(s => ({ a: blah })); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway ~~~~~~~~~~~~~~~~~~ -!!! Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. +!!! error TS2345: Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. ~~~~ -!!! Cannot find name 'blah'. \ No newline at end of file +!!! error TS2304: Cannot find name 'blah'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithinClasses.errors.txt b/tests/baselines/reference/overloadsWithinClasses.errors.txt index c67bba6162..9a6e0618a3 100644 --- a/tests/baselines/reference/overloadsWithinClasses.errors.txt +++ b/tests/baselines/reference/overloadsWithinClasses.errors.txt @@ -5,7 +5,7 @@ static fnOverload(foo: string){ } // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Duplicate function implementation. +!!! error TS2393: Duplicate function implementation. } diff --git a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt index 0e7200d122..1ed7814243 100644 --- a/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt +++ b/tests/baselines/reference/overridingPrivateStaticMembers.errors.txt @@ -5,7 +5,7 @@ class Derived2 extends Base2 { ~~~~~~~~ -!!! Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': -!!! Private property 'y' cannot be reimplemented. +!!! error TS2418: Class static side 'typeof Derived2' incorrectly extends base class static side 'typeof Base2': +!!! error TS2418: Private property 'y' cannot be reimplemented. private static y: { foo: string; bar: string; }; } \ No newline at end of file diff --git a/tests/baselines/reference/paramPropertiesInSignatures.errors.txt b/tests/baselines/reference/paramPropertiesInSignatures.errors.txt index 46ac90581e..2a76f613a3 100644 --- a/tests/baselines/reference/paramPropertiesInSignatures.errors.txt +++ b/tests/baselines/reference/paramPropertiesInSignatures.errors.txt @@ -2,21 +2,21 @@ class C1 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any) {} // OK } declare class C2 { constructor(public p1:string); // ERROR ~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(private p2:number); // ERROR ~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public p3:any); // ERROR ~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt index 2394b91104..8ce6089cce 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor1.errors.txt @@ -3,7 +3,7 @@ class Customers { constructor(public names: string); ~~~~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } } \ No newline at end of file diff --git a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt index deb9806812..4cb790bdff 100644 --- a/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt +++ b/tests/baselines/reference/parameterPropertyInConstructor2.errors.txt @@ -3,12 +3,12 @@ class Customers { constructor(public names: string); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Overload signature is not compatible with function implementation. +!!! error TS2394: Overload signature is not compatible with function implementation. ~~~~~~~~~~~~~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. constructor(public names: string, public ages: number) { ~~~~~ -!!! Duplicate identifier 'names'. +!!! error TS2300: Duplicate identifier 'names'. } } } diff --git a/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt b/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt index 316a71a37b..37e9897ee8 100644 --- a/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt +++ b/tests/baselines/reference/parameterPropertyOutsideConstructor.errors.txt @@ -2,6 +2,6 @@ class C { foo(public x) { ~~~~~~~~ -!!! A parameter property is only allowed in a constructor implementation. +!!! error TS2369: A parameter property is only allowed in a constructor implementation. } } \ No newline at end of file diff --git a/tests/baselines/reference/parse1.errors.txt b/tests/baselines/reference/parse1.errors.txt index b2c9a06efe..a0f5ff5397 100644 --- a/tests/baselines/reference/parse1.errors.txt +++ b/tests/baselines/reference/parse1.errors.txt @@ -4,5 +4,5 @@ bar. } ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/parse2.errors.txt b/tests/baselines/reference/parse2.errors.txt index f7d424001c..eb2f5e7904 100644 --- a/tests/baselines/reference/parse2.errors.txt +++ b/tests/baselines/reference/parse2.errors.txt @@ -3,4 +3,4 @@ foo( } ~ -!!! Argument expression expected. \ No newline at end of file +!!! error TS1135: Argument expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/parseTypes.errors.txt b/tests/baselines/reference/parseTypes.errors.txt index 49b9218320..e2b53a6ed4 100644 --- a/tests/baselines/reference/parseTypes.errors.txt +++ b/tests/baselines/reference/parseTypes.errors.txt @@ -9,15 +9,15 @@ y=f; y=g; ~ -!!! Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. x=g; ~ -!!! Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2323: Type '(s: string) => void' is not assignable to type '() => number'. w=g; ~ -!!! Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }': -!!! Index signature is missing in type '(s: string) => void'. +!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }': +!!! error TS2322: Index signature is missing in type '(s: string) => void'. z=g; ~ -!!! Type '(s: string) => void' is not assignable to type 'new () => number'. +!!! error TS2323: Type '(s: string) => void' is not assignable to type 'new () => number'. \ No newline at end of file diff --git a/tests/baselines/reference/parser0_004152.errors.txt b/tests/baselines/reference/parser0_004152.errors.txt index 551d6aab5c..3e690e3c93 100644 --- a/tests/baselines/reference/parser0_004152.errors.txt +++ b/tests/baselines/reference/parser0_004152.errors.txt @@ -1,73 +1,73 @@ ==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (34 errors) ==== export class Game { ~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. private position = new DisplayPosition([), 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 0], NoMove, 0); ~ -!!! Expression or comma expected. +!!! error TS1137: Expression or comma expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! ';' expected. +!!! error TS1005: ';' expected. ~ -!!! Unexpected token. A constructor, method, accessor, or property was expected. +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. ~~~~~~~~~~~~~~~ -!!! Cannot find name 'DisplayPosition'. +!!! error TS2304: Cannot find name 'DisplayPosition'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '3'. +!!! error TS2300: Duplicate identifier '3'. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. ~ -!!! Duplicate identifier '0'. +!!! error TS2300: Duplicate identifier '0'. private prevConfig: SeedCoords[][]; ~~~~~~~~~~ -!!! Cannot find name 'SeedCoords'. +!!! error TS2304: Cannot find name 'SeedCoords'. } \ No newline at end of file diff --git a/tests/baselines/reference/parser10.1.1-8gs.errors.txt b/tests/baselines/reference/parser10.1.1-8gs.errors.txt index 4ed4b8b263..e436efeaeb 100644 --- a/tests/baselines/reference/parser10.1.1-8gs.errors.txt +++ b/tests/baselines/reference/parser10.1.1-8gs.errors.txt @@ -16,12 +16,12 @@ "use strict"; throw NotEarlyError; ~~~~~~~~~~~~~ -!!! Cannot find name 'NotEarlyError'. +!!! error TS2304: Cannot find name 'NotEarlyError'. var public = 1; ~~~~~~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. ~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. ~ -!!! Variable declaration expected. +!!! error TS1134: Variable declaration expected. \ No newline at end of file diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt index 694dc1ac57..f1e61a15e8 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt +++ b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt @@ -25,5 +25,5 @@ } runTestCase(testcase); ~~~~~~~~~~~ -!!! Cannot find name 'runTestCase'. +!!! error TS2304: Cannot find name 'runTestCase'. \ No newline at end of file diff --git a/tests/baselines/reference/parser509534.errors.txt b/tests/baselines/reference/parser509534.errors.txt index e40d485cb6..f8c6e5d3bb 100644 --- a/tests/baselines/reference/parser509534.errors.txt +++ b/tests/baselines/reference/parser509534.errors.txt @@ -2,10 +2,10 @@ "use strict"; var config = require("../config"); ~~~~~~~ -!!! Cannot find name 'require'. +!!! error TS2304: Cannot find name 'require'. module.exports.route = function (server) { ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. // General Login Page server.get(config.env.siteRoot + "/auth/login", function (req, res, next) { diff --git a/tests/baselines/reference/parser509546.errors.txt b/tests/baselines/reference/parser509546.errors.txt index e3e361e6c6..ed54e7f90a 100644 --- a/tests/baselines/reference/parser509546.errors.txt +++ b/tests/baselines/reference/parser509546.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts (1 errors) ==== export class Logger { ~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509546_1.errors.txt b/tests/baselines/reference/parser509546_1.errors.txt index 3bc50baa00..22518ffb04 100644 --- a/tests/baselines/reference/parser509546_1.errors.txt +++ b/tests/baselines/reference/parser509546_1.errors.txt @@ -1,7 +1,7 @@ ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts (1 errors) ==== export class Logger { ~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509546_2.errors.txt b/tests/baselines/reference/parser509546_2.errors.txt index 08b4b95260..8699ce66ad 100644 --- a/tests/baselines/reference/parser509546_2.errors.txt +++ b/tests/baselines/reference/parser509546_2.errors.txt @@ -3,7 +3,7 @@ export class Logger { ~~~~~~ -!!! Cannot compile external modules unless the '--module' flag is provided. +!!! error TS1148: Cannot compile external modules unless the '--module' flag is provided. public } \ No newline at end of file diff --git a/tests/baselines/reference/parser509618.errors.txt b/tests/baselines/reference/parser509618.errors.txt index 84ea778e0c..8131a7b804 100644 --- a/tests/baselines/reference/parser509618.errors.txt +++ b/tests/baselines/reference/parser509618.errors.txt @@ -2,6 +2,6 @@ declare module ambiModule { interface i1 { }; ~ -!!! Statements are not allowed in ambient contexts. +!!! error TS1036: Statements are not allowed in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/parser509630.errors.txt b/tests/baselines/reference/parser509630.errors.txt index 72be30146d..a946ff391b 100644 --- a/tests/baselines/reference/parser509630.errors.txt +++ b/tests/baselines/reference/parser509630.errors.txt @@ -3,7 +3,7 @@ public examples = [ // typing here } ~ -!!! Expression or comma expected. +!!! error TS1137: Expression or comma expected. class Any extends Type { } \ No newline at end of file diff --git a/tests/baselines/reference/parser509667.errors.txt b/tests/baselines/reference/parser509667.errors.txt index 684616da41..b83fc2242f 100644 --- a/tests/baselines/reference/parser509667.errors.txt +++ b/tests/baselines/reference/parser509667.errors.txt @@ -4,7 +4,7 @@ if (this. } ~ -!!! Identifier expected. +!!! error TS1003: Identifier expected. f2() { } diff --git a/tests/baselines/reference/parser509668.errors.txt b/tests/baselines/reference/parser509668.errors.txt index 36dc0523dd..59b75dc222 100644 --- a/tests/baselines/reference/parser509668.errors.txt +++ b/tests/baselines/reference/parser509668.errors.txt @@ -3,5 +3,5 @@ // Doesn't work, but should constructor (public ...args: string[]) { } ~~~ -!!! ',' expected. +!!! error TS1005: ',' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/parser509669.errors.txt b/tests/baselines/reference/parser509669.errors.txt index 05ce0f609e..cdd1360971 100644 --- a/tests/baselines/reference/parser509669.errors.txt +++ b/tests/baselines/reference/parser509669.errors.txt @@ -2,5 +2,5 @@ function foo():any { return ():void {}; ~ -!!! '=>' expected. +!!! error TS1005: '=>' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/parser509693.errors.txt b/tests/baselines/reference/parser509693.errors.txt index dd1aa4b120..500b2c6588 100644 --- a/tests/baselines/reference/parser509693.errors.txt +++ b/tests/baselines/reference/parser509693.errors.txt @@ -1,6 +1,6 @@ ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts (2 errors) ==== if (!module.exports) module.exports = ""; ~~~~~~ -!!! Cannot find name 'module'. +!!! error TS2304: Cannot find name 'module'. ~~~~~~ -!!! Cannot find name 'module'. \ No newline at end of file +!!! error TS2304: Cannot find name 'module'. \ No newline at end of file diff --git a/tests/baselines/reference/parser509698.errors.txt b/tests/baselines/reference/parser509698.errors.txt index 8a8b23d44e..c193ad0e51 100644 --- a/tests/baselines/reference/parser509698.errors.txt +++ b/tests/baselines/reference/parser509698.errors.txt @@ -1,11 +1,11 @@ -!!! Cannot find global type 'Array'. -!!! Cannot find global type 'Boolean'. -!!! Cannot find global type 'Function'. -!!! Cannot find global type 'IArguments'. -!!! Cannot find global type 'Number'. -!!! Cannot find global type 'Object'. -!!! Cannot find global type 'RegExp'. -!!! Cannot find global type 'String'. +!!! error TS2318: Cannot find global type 'Array'. +!!! error TS2318: Cannot find global type 'Boolean'. +!!! error TS2318: Cannot find global type 'Function'. +!!! error TS2318: Cannot find global type 'IArguments'. +!!! error TS2318: Cannot find global type 'Number'. +!!! error TS2318: Cannot find global type 'Object'. +!!! error TS2318: Cannot find global type 'RegExp'. +!!! error TS2318: Cannot find global type 'String'. ==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509698.ts (0 errors) ==== ///