Skip to content

Add full stops in diagnostic messages #40165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@
"category": "Error",
"code": 1325
},
"Dynamic import cannot have type arguments": {
"Dynamic import cannot have type arguments.": {
"category": "Error",
"code": 1326
},
Expand Down Expand Up @@ -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
},
Expand Down Expand Up @@ -2270,7 +2270,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
},
Expand Down Expand Up @@ -2772,7 +2772,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
},
Expand Down Expand Up @@ -4354,7 +4354,7 @@
"category": "Message",
"code": 6204
},
"All type parameters are unused": {
"All type parameters are unused.": {
"category": "Error",
"code": 6205
},
Expand Down Expand Up @@ -5889,7 +5889,7 @@
"category": "Error",
"code": 18007
},
"Private identifiers cannot be used as parameters": {
"Private identifiers cannot be used as parameters.": {
"category": "Error",
"code": 18009
},
Expand Down Expand Up @@ -5929,7 +5929,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
},
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/classImplementsClass6.errors.txt
Original file line number Diff line number Diff line change
@@ -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) ====
Expand Down Expand Up @@ -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'.
8 changes: 4 additions & 4 deletions tests/baselines/reference/classSideInheritance1.errors.txt
Original file line number Diff line number Diff line change
@@ -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) ====
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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'.

Expand All @@ -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'.
Expand Down
8 changes: 4 additions & 4 deletions tests/baselines/reference/cloduleTest2.errors.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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'.
Expand All @@ -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'.
Expand Down
Original file line number Diff line number Diff line change
@@ -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) ====
Expand Down Expand Up @@ -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

Expand All @@ -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.

Original file line number Diff line number Diff line change
@@ -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) ====
Expand All @@ -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.
32 changes: 16 additions & 16 deletions tests/baselines/reference/logicalAndOperatorStrictMode.errors.txt
Original file line number Diff line number Diff line change
@@ -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) ====
Expand Down Expand Up @@ -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;
Expand Down
Loading