Add full stops in diagnostic messages (#40165)

* Add full stops in diagnostic messages (fixes #37753)

* Accept baselines

* Fix whitespace
This commit is contained in:
cherryblossom000
2020-09-08 08:47:52 -07:00
committed by GitHub
parent e5fd0dd1e3
commit 2ef393ba7d
35 changed files with 158 additions and 158 deletions
+7 -7
View File
@@ -936,7 +936,7 @@
"category": "Error",
"code": 1325
},
"Dynamic import cannot have type arguments": {
"Dynamic import cannot have type arguments.": {
"category": "Error",
"code": 1326
},
@@ -1008,7 +1008,7 @@
"category": "Error",
"code": 1344
},
"An expression of type 'void' cannot be tested for truthiness": {
"An expression of type 'void' cannot be tested for truthiness.": {
"category": "Error",
"code": 1345
},
@@ -2278,7 +2278,7 @@
"category": "Error",
"code": 2575
},
"Property '{0}' is a static member of type '{1}'": {
"Property '{0}' is a static member of type '{1}'.": {
"category": "Error",
"code": 2576
},
@@ -2784,7 +2784,7 @@
"category": "Error",
"code": 2731
},
"Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension": {
"Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension.": {
"category": "Error",
"code": 2732
},
@@ -4365,7 +4365,7 @@
"category": "Message",
"code": 6204
},
"All type parameters are unused": {
"All type parameters are unused.": {
"category": "Error",
"code": 6205
},
@@ -5900,7 +5900,7 @@
"category": "Error",
"code": 18007
},
"Private identifiers cannot be used as parameters": {
"Private identifiers cannot be used as parameters.": {
"category": "Error",
"code": 18009
},
@@ -5940,7 +5940,7 @@
"category": "Error",
"code": 18018
},
"'{0}' modifier cannot be used with a private identifier": {
"'{0}' modifier cannot be used with a private identifier.": {
"category": "Error",
"code": 18019
},
@@ -1,5 +1,5 @@
tests/cases/compiler/classImplementsClass6.ts(20,3): error TS2339: Property 'bar' does not exist on type 'C'.
tests/cases/compiler/classImplementsClass6.ts(21,4): error TS2576: Property 'bar' is a static member of type 'C2'
tests/cases/compiler/classImplementsClass6.ts(21,4): error TS2576: Property 'bar' is a static member of type 'C2'.
==== tests/cases/compiler/classImplementsClass6.ts (2 errors) ====
@@ -27,4 +27,4 @@ tests/cases/compiler/classImplementsClass6.ts(21,4): error TS2576: Property 'bar
!!! error TS2339: Property 'bar' does not exist on type 'C'.
c2.bar(); // should error
~~~
!!! error TS2576: Property 'bar' is a static member of type 'C2'
!!! error TS2576: Property 'bar' is a static member of type 'C2'.
@@ -1,5 +1,5 @@
tests/cases/compiler/classSideInheritance1.ts(12,3): error TS2576: Property 'bar' is a static member of type 'A'
tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2576: Property 'bar' is a static member of type 'C2'
tests/cases/compiler/classSideInheritance1.ts(12,3): error TS2576: Property 'bar' is a static member of type 'A'.
tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2576: Property 'bar' is a static member of type 'C2'.
==== tests/cases/compiler/classSideInheritance1.ts (2 errors) ====
@@ -16,9 +16,9 @@ tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2576: Property 'bar
var c: C2;
a.bar(); // static off an instance - should be an error
~~~
!!! error TS2576: Property 'bar' is a static member of type 'A'
!!! error TS2576: Property 'bar' is a static member of type 'A'.
c.bar(); // static off an instance - should be an error
~~~
!!! error TS2576: Property 'bar' is a static member of type 'C2'
!!! error TS2576: Property 'bar' is a static member of type 'C2'.
A.bar(); // valid
C2.bar(); // valid
@@ -1,5 +1,5 @@
tests/cases/compiler/classStaticPropertyAccess.ts(9,1): error TS2576: Property 'y' is a static member of type 'A'
tests/cases/compiler/classStaticPropertyAccess.ts(10,3): error TS2576: Property 'y' is a static member of type 'A'
tests/cases/compiler/classStaticPropertyAccess.ts(9,1): error TS2576: Property 'y' is a static member of type 'A'.
tests/cases/compiler/classStaticPropertyAccess.ts(10,3): error TS2576: Property 'y' is a static member of type 'A'.
tests/cases/compiler/classStaticPropertyAccess.ts(11,3): error TS2341: Property '_b' is private and only accessible within class 'A'.
tests/cases/compiler/classStaticPropertyAccess.ts(12,3): error TS2339: Property 'a' does not exist on type 'typeof A'.
@@ -15,10 +15,10 @@ tests/cases/compiler/classStaticPropertyAccess.ts(12,3): error TS2339: Property
a['y'] // Error
~~~~~~
!!! error TS2576: Property 'y' is a static member of type 'A'
!!! error TS2576: Property 'y' is a static member of type 'A'.
a.y // Error
~
!!! error TS2576: Property 'y' is a static member of type 'A'
!!! error TS2576: Property 'y' is a static member of type 'A'.
A._b // Error
~~
!!! error TS2341: Property '_b' is private and only accessible within class 'A'.
@@ -1,8 +1,8 @@
tests/cases/compiler/cloduleTest2.ts(4,13): error TS2554: Expected 1 arguments, but got 0.
tests/cases/compiler/cloduleTest2.ts(10,13): error TS2554: Expected 1 arguments, but got 0.
tests/cases/compiler/cloduleTest2.ts(18,7): error TS2576: Property 'bar' is a static member of type 'm3d'
tests/cases/compiler/cloduleTest2.ts(18,7): error TS2576: Property 'bar' is a static member of type 'm3d'.
tests/cases/compiler/cloduleTest2.ts(19,7): error TS2339: Property 'y' does not exist on type 'm3d'.
tests/cases/compiler/cloduleTest2.ts(27,7): error TS2576: Property 'bar' is a static member of type 'm3d'
tests/cases/compiler/cloduleTest2.ts(27,7): error TS2576: Property 'bar' is a static member of type 'm3d'.
tests/cases/compiler/cloduleTest2.ts(28,7): error TS2339: Property 'y' does not exist on type 'm3d'.
tests/cases/compiler/cloduleTest2.ts(33,9): error TS2554: Expected 1 arguments, but got 0.
tests/cases/compiler/cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, but got 0.
@@ -34,7 +34,7 @@ tests/cases/compiler/cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments,
r.foo();
r.bar(); // error
~~~
!!! error TS2576: Property 'bar' is a static member of type 'm3d'
!!! error TS2576: Property 'bar' is a static member of type 'm3d'.
r.y; // error
~
!!! error TS2339: Property 'y' does not exist on type 'm3d'.
@@ -47,7 +47,7 @@ tests/cases/compiler/cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments,
r.foo();
r.bar(); // error
~~~
!!! error TS2576: Property 'bar' is a static member of type 'm3d'
!!! error TS2576: Property 'bar' is a static member of type 'm3d'.
r.y; // error
~
!!! error TS2339: Property 'y' does not exist on type 'm3d'.
@@ -1,8 +1,8 @@
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(36,1): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(39,1): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(58,20): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(61,23): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(63,32): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(36,1): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(39,1): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(58,20): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(61,23): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(63,32): error TS1345: An expression of type 'void' cannot be tested for truthiness.
==== tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts (5 errors) ====
@@ -43,12 +43,12 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorCondit
//Cond is an object type expression
foo() ? exprAny1 : exprAny2;
~~~~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
new Date() ? exprBoolean1 : exprBoolean2;
new C() ? exprNumber1 : exprNumber2;
C.doIt() ? exprString1 : exprString2;
~~~~~~~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
condObject.valueOf() ? exprIsObject1 : exprIsObject2;
new Date() ? exprString1 : exprBoolean1; // union
@@ -69,14 +69,14 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorCondit
var resultIsAny3 = foo() ? exprAny1 : exprAny2;
~~~~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var resultIsBoolean3 = new Date() ? exprBoolean1 : exprBoolean2;
var resultIsNumber3 = new C() ? exprNumber1 : exprNumber2;
var resultIsString3 = C.doIt() ? exprString1 : exprString2;
~~~~~~~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var resultIsObject3 = condObject.valueOf() ? exprIsObject1 : exprIsObject2;
var resultIsStringOrBoolean3 = C.doIt() ? exprString1 : exprBoolean1; // union
~~~~~~~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
@@ -1,5 +1,5 @@
tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments
tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments
tests/cases/conformance/dynamicImport/1.ts(2,10): error TS1326: Dynamic import cannot have type arguments.
tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import cannot have type arguments.
==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ====
@@ -9,7 +9,7 @@ tests/cases/conformance/dynamicImport/1.ts(3,10): error TS1326: Dynamic import c
"use strict"
var p1 = import<Promise<any>>("./0"); // error
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1326: Dynamic import cannot have type arguments
!!! error TS1326: Dynamic import cannot have type arguments.
var p2 = import<>("./0"); // error
~~~~~~~~~~~~~~~
!!! error TS1326: Dynamic import cannot have type arguments
!!! error TS1326: Dynamic import cannot have type arguments.
@@ -1,11 +1,11 @@
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(46,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(47,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(48,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(49,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(50,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(51,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(52,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(53,12): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(46,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(47,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(48,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(49,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(50,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(51,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(52,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts(53,12): error TS1345: An expression of type 'void' cannot be tested for truthiness.
==== tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorStrictMode.ts (8 errors) ====
@@ -56,28 +56,28 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
const v1 = v && a;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const v2 = v && s;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const v3 = v && x;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const v4 = v && b;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const v5 = v && v;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const v6 = v && u;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const v7 = v && n;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const v8 = v && z;
~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
const u1 = u && a;
const u2 = u && s;
@@ -1,13 +1,13 @@
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(19,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(30,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(41,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(52,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(63,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(74,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(85,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(96,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(107,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(118,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(19,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(30,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(41,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(52,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(63,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(74,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(85,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(96,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(107,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts(118,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
==== tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAndOperatorWithEveryType.ts (10 errors) ====
@@ -31,7 +31,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var ra4 = a4 && a1;
var ra5 = a5 && a1;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var ra6 = a6 && a1;
var ra7 = a7 && a1;
var ra8 = a8 && a1;
@@ -44,7 +44,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var rb4 = a4 && a2;
var rb5 = a5 && a2;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rb6 = a6 && a2;
var rb7 = a7 && a2;
var rb8 = a8 && a2;
@@ -57,7 +57,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var rc4 = a4 && a3;
var rc5 = a5 && a3;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rc6 = a6 && a3;
var rc7 = a7 && a3;
var rc8 = a8 && a3;
@@ -70,7 +70,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var rd4 = a4 && a4;
var rd5 = a5 && a4;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rd6 = a6 && a4;
var rd7 = a7 && a4;
var rd8 = a8 && a4;
@@ -83,7 +83,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var re4 = a4 && a5;
var re5 = a5 && a5;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var re6 = a6 && a5;
var re7 = a7 && a5;
var re8 = a8 && a5;
@@ -96,7 +96,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var rf4 = a4 && a6;
var rf5 = a5 && a6;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rf6 = a6 && a6;
var rf7 = a7 && a6;
var rf8 = a8 && a6;
@@ -109,7 +109,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var rg4 = a4 && a7;
var rg5 = a5 && a7;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rg6 = a6 && a7;
var rg7 = a7 && a7;
var rg8 = a8 && a7;
@@ -122,7 +122,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var rh4 = a4 && a8;
var rh5 = a5 && a8;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rh6 = a6 && a8;
var rh7 = a7 && a8;
var rh8 = a8 && a8;
@@ -135,7 +135,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var ri4 = a4 && null;
var ri5 = a5 && null;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var ri6 = a6 && null;
var ri7 = a7 && null;
var ri8 = a8 && null;
@@ -148,7 +148,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalAndOperator/logicalAn
var rj4 = a4 && undefined;
var rj5 = a5 && undefined;
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rj6 = a6 && undefined;
var rj7 = a7 && undefined;
var rj8 = a8 && undefined;
@@ -1,13 +1,13 @@
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(21,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(32,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(43,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(54,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(65,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(76,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(87,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(98,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(109,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(120,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(21,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(32,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(43,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(54,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(65,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(76,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(87,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(98,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(109,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts(120,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
==== tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithEveryType.ts (10 errors) ====
@@ -33,7 +33,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var ra4 = a4 || a1; // string || any is any
var ra5 = a5 || a1; // void || any is any
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var ra6 = a6 || a1; // enum || any is any
var ra7 = a7 || a1; // object || any is any
var ra8 = a8 || a1; // array || any is any
@@ -46,7 +46,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var rb4 = a4 || a2; // string || boolean is string | boolean
var rb5 = a5 || a2; // void || boolean is void | boolean
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rb6 = a6 || a2; // enum || boolean is E | boolean
var rb7 = a7 || a2; // object || boolean is object | boolean
var rb8 = a8 || a2; // array || boolean is array | boolean
@@ -59,7 +59,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var rc4 = a4 || a3; // string || number is string | number
var rc5 = a5 || a3; // void || number is void | number
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rc6 = a6 || a3; // enum || number is number
var rc7 = a7 || a3; // object || number is object | number
var rc8 = a8 || a3; // array || number is array | number
@@ -72,7 +72,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var rd4 = a4 || a4; // string || string is string
var rd5 = a5 || a4; // void || string is void | string
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rd6 = a6 || a4; // enum || string is enum | string
var rd7 = a7 || a4; // object || string is object | string
var rd8 = a8 || a4; // array || string is array | string
@@ -85,7 +85,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var re4 = a4 || a5; // string || void is string | void
var re5 = a5 || a5; // void || void is void
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var re6 = a6 || a5; // enum || void is enum | void
var re7 = a7 || a5; // object || void is object | void
var re8 = a8 || a5; // array || void is array | void
@@ -98,7 +98,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var rg4 = a4 || a6; // string || enum is string | enum
var rg5 = a5 || a6; // void || enum is void | enum
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rg6 = a6 || a6; // enum || enum is E
var rg7 = a7 || a6; // object || enum is object | enum
var rg8 = a8 || a6; // array || enum is array | enum
@@ -111,7 +111,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var rh4 = a4 || a7; // string || object is string | object
var rh5 = a5 || a7; // void || object is void | object
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rh6 = a6 || a7; // enum || object is enum | object
var rh7 = a7 || a7; // object || object is object
var rh8 = a8 || a7; // array || object is array | object
@@ -124,7 +124,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var ri4 = a4 || a8; // string || array is string | array
var ri5 = a5 || a8; // void || array is void | array
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var ri6 = a6 || a8; // enum || array is enum | array
var ri7 = a7 || a8; // object || array is object | array
var ri8 = a8 || a8; // array || array is array
@@ -137,7 +137,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var rj4 = a4 || null; // string || null is string
var rj5 = a5 || null; // void || null is void
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rj6 = a6 || null; // enum || null is E
var rj7 = a7 || null; // object || null is object
var rj8 = a8 || null; // array || null is array
@@ -150,7 +150,7 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrO
var rf4 = a4 || undefined; // string || undefined is string
var rf5 = a5 || undefined; // void || undefined is void
~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
var rf6 = a6 || undefined; // enum || undefined is E
var rf7 = a7 || undefined; // object || undefined is object
var rf8 = a8 || undefined; // array || undefined is array
@@ -1,6 +1,6 @@
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(3,5): error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(4,5): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(5,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(5,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(6,12): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(7,9): error TS18023: An accessor cannot be named with a private identifier.
@@ -23,7 +23,7 @@ tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(10,16)
!!! error TS18022: A method cannot be named with a private identifier.
static #sField = "hello world";
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
static #sMethod() {}
~~~~~~~~
!!! error TS18022: A method cannot be named with a private identifier.
@@ -1,6 +1,6 @@
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(3,5): error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(4,5): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(5,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(5,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(6,12): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(7,9): error TS18023: An accessor cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(8,9): error TS18023: An accessor cannot be named with a private identifier.
@@ -19,7 +19,7 @@ tests/cases/conformance/classes/members/privateNames/privateNameES5Ban.ts(10,16)
!!! error TS18022: A method cannot be named with a private identifier.
static #sField = "hello world";
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
static #sMethod() {}
~~~~~~~~
!!! error TS18022: A method cannot be named with a private identifier.
@@ -1,6 +1,6 @@
tests/cases/conformance/classes/members/privateNames/privateNameFieldsESNext.ts(8,9): error TS2322: Type 'string' is not assignable to type 'number'.
tests/cases/conformance/classes/members/privateNames/privateNameFieldsESNext.ts(11,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNameFieldsESNext.ts(12,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNameFieldsESNext.ts(11,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNameFieldsESNext.ts(12,5): error TS18019: 'static' modifier cannot be used with a private identifier.
==== tests/cases/conformance/classes/members/privateNames/privateNameFieldsESNext.ts (3 errors) ====
@@ -18,10 +18,10 @@ tests/cases/conformance/classes/members/privateNames/privateNameFieldsESNext.ts(
}
static #m = "test";
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
static #x;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
static test() {
console.log(this.#m);
console.log(this.#x = "test");
@@ -1,18 +1,18 @@
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(2,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(2,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(6,11): error TS18013: Property '#foo' is not accessible outside class 'B' because it has a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(7,11): error TS2339: Property '#bar' does not exist on type 'typeof B'.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(12,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts(12,5): error TS18019: 'static' modifier cannot be used with a private identifier.
==== tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields.ts (5 errors) ====
class A {
static #foo: number;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
static #bar: number;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
constructor () {
A.#foo = 3;
B.#foo; // Error
@@ -27,7 +27,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticFields
class B extends A {
static #foo: string;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
constructor () {
super();
B.#foo = "some string";
@@ -1,7 +1,7 @@
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(2,12): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(3,18): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(4,19): error TS18022: A method cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(7,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(7,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(8,16): error TS18023: An accessor cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(11,16): error TS18023: An accessor cannot be named with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethods.ts(24,12): error TS18022: A method cannot be named with a private identifier.
@@ -22,7 +22,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesAndStaticMethod
}
static #_quux: number;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
static get #quux (): number {
~~~~~
!!! error TS18023: An accessor cannot be named with a private identifier.
@@ -1,4 +1,4 @@
tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChain-1.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChain-1.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChain-1.ts(6,15): error TS2339: Property '#bar' does not exist on type 'typeof Child'.
@@ -7,7 +7,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChai
#foo = 3;
static #bar = 5;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
accessChildProps() {
new Child().#foo; // OK (`#foo` was added when `Parent`'s constructor was called on `child`)
Child.#bar; // Error: not found
@@ -1,4 +1,4 @@
tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChain-2.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChain-2.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChain-2.ts(6,15): error TS2339: Property '#bar' does not exist on type 'typeof Child'.
@@ -7,7 +7,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesConstructorChai
#foo = 3;
static #bar = 5;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
accessChildProps() {
new Child<string>().#foo; // OK (`#foo` was added when `Parent`'s constructor was called on `child`)
Child.#bar; // Error: not found
@@ -1,4 +1,4 @@
tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses-2.ts(2,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses-2.ts(2,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses-2.ts(9,27): error TS18014: The property '#x' cannot be accessed on type 'typeof A' within this class because it is shadowed by another private identifier with the same spelling.
@@ -6,7 +6,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesInNestedClasses
class A {
static #x = 5;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
constructor () {
class B {
#x = 5;
@@ -1,8 +1,8 @@
tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts(2,5): error TS18010: An accessibility modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts(3,5): error TS18010: An accessibility modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts(4,5): error TS18010: An accessibility modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts(6,5): error TS18019: 'declare' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts(10,5): error TS18019: 'abstract' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts(6,5): error TS18019: 'declare' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts(10,5): error TS18019: 'abstract' modifier cannot be used with a private identifier.
==== tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleModifiers.ts (5 errors) ====
@@ -19,12 +19,12 @@ tests/cases/conformance/classes/members/privateNames/privateNamesIncompatibleMod
readonly #qux = 3; // OK
declare #what: number; // Error
~~~~~~~
!!! error TS18019: 'declare' modifier cannot be used with a private identifier
!!! error TS18019: 'declare' modifier cannot be used with a private identifier.
}
abstract class B {
abstract #quux = 3; // Error
~~~~~~~~
!!! error TS18019: 'abstract' modifier cannot be used with a private identifier
!!! error TS18019: 'abstract' modifier cannot be used with a private identifier.
}
@@ -1,10 +1,10 @@
tests/cases/conformance/classes/members/privateNames/privateNamesNotAllowedAsParameters.ts(2,12): error TS18009: Private identifiers cannot be used as parameters
tests/cases/conformance/classes/members/privateNames/privateNamesNotAllowedAsParameters.ts(2,12): error TS18009: Private identifiers cannot be used as parameters.
==== tests/cases/conformance/classes/members/privateNames/privateNamesNotAllowedAsParameters.ts (1 errors) ====
class A {
setFoo(#foo: string) {}
~~~~
!!! error TS18009: Private identifiers cannot be used as parameters
!!! error TS18009: Private identifiers cannot be used as parameters.
}
@@ -1,6 +1,6 @@
tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(3,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(3,12): error TS2300: Duplicate identifier '#foo'.
tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(9,5): error TS18019: 'static' modifier cannot be used with a private identifier
tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(9,5): error TS18019: 'static' modifier cannot be used with a private identifier.
tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(11,11): error TS2339: Property '#foo' does not exist on type 'B'.
@@ -9,7 +9,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(11,
#foo = 1;
static #foo = true; // error (duplicate)
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
~~~~
!!! error TS2300: Duplicate identifier '#foo'.
// because static and instance private names
@@ -19,7 +19,7 @@ tests/cases/conformance/classes/members/privateNames/privateNamesUnique-3.ts(11,
class B {
static #foo = true;
~~~~~~
!!! error TS18019: 'static' modifier cannot be used with a private identifier
!!! error TS18019: 'static' modifier cannot be used with a private identifier.
test(x: B) {
x.#foo; // error (#foo is a static property on B, not an instance property)
~~~~
@@ -1,15 +1,15 @@
tests/cases/compiler/file1.ts(1,21): error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
tests/cases/compiler/file1.ts(3,21): error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
tests/cases/compiler/file1.ts(1,21): error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
tests/cases/compiler/file1.ts(3,21): error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
==== tests/cases/compiler/file1.ts (2 errors) ====
import b1 = require('./b.json'); // error
~~~~~~~~~~
!!! error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
!!! error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
let x = b1.a;
import b2 = require('./b.json'); // error
~~~~~~~~~~
!!! error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
!!! error TS2732: Cannot find module './b.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
if (x) {
let b = b2.b;
x = (b1.b === b);
@@ -1,6 +1,6 @@
tests/cases/compiler/staticMemberExportAccess.ts(14,39): error TS2351: This expression is not constructable.
Type 'Sammy' has no construct signatures.
tests/cases/compiler/staticMemberExportAccess.ts(17,18): error TS2576: Property 'bar' is a static member of type 'Sammy'
tests/cases/compiler/staticMemberExportAccess.ts(17,18): error TS2576: Property 'bar' is a static member of type 'Sammy'.
tests/cases/compiler/staticMemberExportAccess.ts(18,18): error TS2339: Property 'x' does not exist on type 'Sammy'.
@@ -26,7 +26,7 @@ tests/cases/compiler/staticMemberExportAccess.ts(18,18): error TS2339: Property
var r2 = $.sammy.foo();
var r3 = $.sammy.bar(); // error
~~~
!!! error TS2576: Property 'bar' is a static member of type 'Sammy'
!!! error TS2576: Property 'bar' is a static member of type 'Sammy'.
var r4 = $.sammy.x; // error
~
!!! error TS2339: Property 'x' does not exist on type 'Sammy'.
@@ -1,4 +1,4 @@
tests/cases/compiler/staticOffOfInstance1.ts(3,10): error TS2576: Property 'Foo' is a static member of type 'List'
tests/cases/compiler/staticOffOfInstance1.ts(3,10): error TS2576: Property 'Foo' is a static member of type 'List'.
==== tests/cases/compiler/staticOffOfInstance1.ts (1 errors) ====
@@ -6,7 +6,7 @@ tests/cases/compiler/staticOffOfInstance1.ts(3,10): error TS2576: Property 'Foo'
public Blah() {
this.Foo();
~~~
!!! error TS2576: Property 'Foo' is a static member of type 'List'
!!! error TS2576: Property 'Foo' is a static member of type 'List'.
}
public static Foo() {}
}
@@ -1,4 +1,4 @@
tests/cases/compiler/staticOffOfInstance2.ts(3,14): error TS2576: Property 'Foo' is a static member of type 'List<T>'
tests/cases/compiler/staticOffOfInstance2.ts(3,14): error TS2576: Property 'Foo' is a static member of type 'List<T>'.
==== tests/cases/compiler/staticOffOfInstance2.ts (1 errors) ====
@@ -6,7 +6,7 @@ tests/cases/compiler/staticOffOfInstance2.ts(3,14): error TS2576: Property 'Foo'
public Blah() {
this.Foo(); // no error
~~~
!!! error TS2576: Property 'Foo' is a static member of type 'List<T>'
!!! error TS2576: Property 'Foo' is a static member of type 'List<T>'.
List.Foo();
}
public static Foo() { }
@@ -1,14 +1,14 @@
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(4,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(5,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(16,16): error TS2576: Property 'foo' is a static member of type 'C'
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(16,16): error TS2576: Property 'foo' is a static member of type 'C'.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(17,16): error TS2339: Property 'bar' does not exist on type 'C'.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(18,16): error TS2576: Property 'x' is a static member of type 'C'
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(18,16): error TS2576: Property 'x' is a static member of type 'C'.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(24,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(25,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(27,21): error TS2302: Static members cannot reference class type parameters.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(36,16): error TS2576: Property 'foo' is a static member of type 'C<number, string>'
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(36,16): error TS2576: Property 'foo' is a static member of type 'C<number, string>'.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(37,16): error TS2339: Property 'bar' does not exist on type 'C<number, string>'.
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(38,16): error TS2576: Property 'x' is a static member of type 'C<number, string>'
tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(38,16): error TS2576: Property 'x' is a static member of type 'C<number, string>'.
==== tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts (11 errors) ====
@@ -33,13 +33,13 @@ tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.
var r = c.fn();
var r4 = c.foo; // error
~~~
!!! error TS2576: Property 'foo' is a static member of type 'C'
!!! error TS2576: Property 'foo' is a static member of type 'C'.
var r5 = c.bar; // error
~~~
!!! error TS2339: Property 'bar' does not exist on type 'C'.
var r6 = c.x; // error
~
!!! error TS2576: Property 'x' is a static member of type 'C'
!!! error TS2576: Property 'x' is a static member of type 'C'.
}
module Generic {
@@ -65,11 +65,11 @@ tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.
var r = c.fn();
var r4 = c.foo; // error
~~~
!!! error TS2576: Property 'foo' is a static member of type 'C<number, string>'
!!! error TS2576: Property 'foo' is a static member of type 'C<number, string>'.
var r5 = c.bar; // error
~~~
!!! error TS2339: Property 'bar' does not exist on type 'C<number, string>'.
var r6 = c.x; // error
~
!!! error TS2576: Property 'x' is a static member of type 'C<number, string>'
!!! error TS2576: Property 'x' is a static member of type 'C<number, string>'.
}
@@ -1,5 +1,5 @@
tests/cases/compiler/staticVisibility2.ts(2,12): error TS7008: Member 'sideLength' implicitly has an 'any' type.
tests/cases/compiler/staticVisibility2.ts(4,14): error TS2576: Property 'sideLength' is a static member of type 'Square'
tests/cases/compiler/staticVisibility2.ts(4,14): error TS2576: Property 'sideLength' is a static member of type 'Square'.
==== tests/cases/compiler/staticVisibility2.ts (2 errors) ====
@@ -10,6 +10,6 @@ tests/cases/compiler/staticVisibility2.ts(4,14): error TS2576: Property 'sideLen
constructor(sideLength: number) {
this.sideLength = sideLength;
~~~~~~~~~~
!!! error TS2576: Property 'sideLength' is a static member of type 'Square'
!!! error TS2576: Property 'sideLength' is a static member of type 'Square'.
}
}
@@ -1,4 +1,4 @@
tests/cases/compiler/superAccess.ts(9,24): error TS2576: Property 'S1' is a static member of type 'MyBase'
tests/cases/compiler/superAccess.ts(9,24): error TS2576: Property 'S1' is a static member of type 'MyBase'.
tests/cases/compiler/superAccess.ts(10,24): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
tests/cases/compiler/superAccess.ts(11,24): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
@@ -14,7 +14,7 @@ tests/cases/compiler/superAccess.ts(11,24): error TS2340: Only public and protec
foo() {
var l3 = super.S1; // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword
~~
!!! error TS2576: Property 'S1' is a static member of type 'MyBase'
!!! error TS2576: Property 'S1' is a static member of type 'MyBase'.
var l4 = super.S2; // Expected => Error: Only public instance methods of the base class are accessible via the 'super' keyword
~~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
@@ -9,7 +9,7 @@ tests/cases/compiler/superAccess2.ts(11,40): error TS17011: 'super' must be call
tests/cases/compiler/superAccess2.ts(11,45): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(11,64): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(15,19): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(17,15): error TS2576: Property 'y' is a static member of type 'P'
tests/cases/compiler/superAccess2.ts(17,15): error TS2576: Property 'y' is a static member of type 'P'.
tests/cases/compiler/superAccess2.ts(20,26): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/compiler/superAccess2.ts(21,15): error TS2339: Property 'x' does not exist on type 'typeof P'.
@@ -55,7 +55,7 @@ tests/cases/compiler/superAccess2.ts(21,15): error TS2339: Property 'x' does not
super.x();
super.y(); // error
~
!!! error TS2576: Property 'y' is a static member of type 'P'
!!! error TS2576: Property 'y' is a static member of type 'P'.
}
static bar(zz = super) {
@@ -1,6 +1,6 @@
tests/cases/compiler/superPropertyAccess2.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/superPropertyAccess2.ts(13,15): error TS2339: Property 'x' does not exist on type 'typeof C'.
tests/cases/compiler/superPropertyAccess2.ts(18,15): error TS2576: Property 'bar' is a static member of type 'C'
tests/cases/compiler/superPropertyAccess2.ts(18,15): error TS2576: Property 'bar' is a static member of type 'C'.
tests/cases/compiler/superPropertyAccess2.ts(19,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
tests/cases/compiler/superPropertyAccess2.ts(22,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/superPropertyAccess2.ts(24,15): error TS2339: Property 'x' does not exist on type 'typeof C'.
@@ -30,7 +30,7 @@ tests/cases/compiler/superPropertyAccess2.ts(24,15): error TS2339: Property 'x'
super();
super.bar(); // error
~~~
!!! error TS2576: Property 'bar' is a static member of type 'C'
!!! error TS2576: Property 'bar' is a static member of type 'C'.
super.x; // error
~
!!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
@@ -1,5 +1,5 @@
tests/cases/compiler/thisInOuterClassBody.ts(5,16): error TS2334: 'this' cannot be referenced in a static property initializer.
tests/cases/compiler/thisInOuterClassBody.ts(12,22): error TS2576: Property 'y' is a static member of type 'Foo'
tests/cases/compiler/thisInOuterClassBody.ts(12,22): error TS2576: Property 'y' is a static member of type 'Foo'.
tests/cases/compiler/thisInOuterClassBody.ts(18,22): error TS2339: Property 'x' does not exist on type 'typeof Foo'.
@@ -19,7 +19,7 @@ tests/cases/compiler/thisInOuterClassBody.ts(18,22): error TS2339: Property 'x'
var f = () => this.x; // 'this' should be type 'Foo' as well
var p = this.y;
~
!!! error TS2576: Property 'y' is a static member of type 'Foo'
!!! error TS2576: Property 'y' is a static member of type 'Foo'.
return this;
}
@@ -28,7 +28,7 @@ Output::
[12:00:23 AM] Starting compilation in watch mode...
a.ts:1:23 - error TS2732: Cannot find module './data.json'. Consider using '--resolveJsonModule' to import module with '.json' extension
a.ts:1:23 - error TS2732: Cannot find module './data.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
1 import * as data from './data.json'
   ~~~~~~~~~~~~~
@@ -1,4 +1,4 @@
tests/cases/compiler/typePredicateInLoop.ts(17,11): error TS1345: An expression of type 'void' cannot be tested for truthiness
tests/cases/compiler/typePredicateInLoop.ts(17,11): error TS1345: An expression of type 'void' cannot be tested for truthiness.
==== tests/cases/compiler/typePredicateInLoop.ts (1 errors) ====
@@ -20,7 +20,7 @@ tests/cases/compiler/typePredicateInLoop.ts(17,11): error TS1345: An expression
for (const ITEM of arg.arr) {
if (otherFunc(ITEM, arg)) {
~~~~~~~~~~~~~~~~~~~~
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness
!!! error TS1345: An expression of type 'void' cannot be tested for truthiness.
}
}
}
@@ -1,4 +1,4 @@
tests/cases/compiler/typeofClass.ts(8,4): error TS2576: Property 'bar' is a static member of type 'K'
tests/cases/compiler/typeofClass.ts(8,4): error TS2576: Property 'bar' is a static member of type 'K'.
tests/cases/compiler/typeofClass.ts(10,4): error TS2339: Property 'foo' does not exist on type 'typeof K'.
@@ -12,7 +12,7 @@ tests/cases/compiler/typeofClass.ts(10,4): error TS2339: Property 'foo' does not
k1.foo;
k1.bar;
~~~
!!! error TS2576: Property 'bar' is a static member of type 'K'
!!! error TS2576: Property 'bar' is a static member of type 'K'.
var k2: typeof K;
k2.foo;
~~~
@@ -1,5 +1,5 @@
/a.js(3,4): error TS6133: 'V' is declared but its value is never read.
/a.js(13,4): error TS6205: All type parameters are unused
/a.js(13,4): error TS6205: All type parameters are unused.
/a.js(20,16): error TS6133: 'V' is declared but its value is never read.
/a.js(20,18): error TS6133: 'X' is declared but its value is never read.
@@ -21,7 +21,7 @@
/**
* @template T,V
~~~~~~~~~~~~~
!!! error TS6205: All type parameters are unused
!!! error TS6205: All type parameters are unused.
*/
class C2 {
constructor() { }