Skip to content

Commit 5ff0f81

Browse files
committed
Diagnostic message punctuation
1 parent 0500065 commit 5ff0f81

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/compiler/diagnosticMessages.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,15 +2035,15 @@
20352035
"category": "Error",
20362036
"code": 2704
20372037
},
2038-
"Required type parameters may not follow optional type parameters": {
2038+
"Required type parameters may not follow optional type parameters.": {
20392039
"category": "Error",
20402040
"code": 2705
20412041
},
20422042
"Type parameter '{0}' has a circular default.": {
20432043
"category": "Error",
20442044
"code": 2706
20452045
},
2046-
"Generic type '{0}' requires between {1} and {2} type arguments": {
2046+
"Generic type '{0}' requires between {1} and {2} type arguments.": {
20472047
"category": "Error",
20482048
"code": 2707
20492049
},

tests/baselines/reference/genericDefaultsErrors.errors.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests/cases/compiler/genericDefaultsErrors.ts(4,26): error TS2706: Type parameter 'T' has a circular default.
22
tests/cases/compiler/genericDefaultsErrors.ts(5,26): error TS2706: Type parameter 'T' has a circular default.
33
tests/cases/compiler/genericDefaultsErrors.ts(5,33): error TS2706: Type parameter 'U' has a circular default.
4-
tests/cases/compiler/genericDefaultsErrors.ts(6,29): error TS2705: Required type parameters may not follow optional type parameters
4+
tests/cases/compiler/genericDefaultsErrors.ts(6,29): error TS2705: Required type parameters may not follow optional type parameters.
55
tests/cases/compiler/genericDefaultsErrors.ts(7,41): error TS2344: Type 'number' does not satisfy the constraint 'string'.
66
tests/cases/compiler/genericDefaultsErrors.ts(8,59): error TS2344: Type 'T' does not satisfy the constraint 'number'.
77
Type 'string' is not assignable to type 'number'.
@@ -22,15 +22,15 @@ tests/cases/compiler/genericDefaultsErrors.ts(27,11): error TS2428: All declarat
2222
tests/cases/compiler/genericDefaultsErrors.ts(29,19): error TS2706: Type parameter 'T' has a circular default.
2323
tests/cases/compiler/genericDefaultsErrors.ts(30,19): error TS2706: Type parameter 'T' has a circular default.
2424
tests/cases/compiler/genericDefaultsErrors.ts(30,26): error TS2706: Type parameter 'U' has a circular default.
25-
tests/cases/compiler/genericDefaultsErrors.ts(31,22): error TS2705: Required type parameters may not follow optional type parameters
25+
tests/cases/compiler/genericDefaultsErrors.ts(31,22): error TS2705: Required type parameters may not follow optional type parameters.
2626
tests/cases/compiler/genericDefaultsErrors.ts(32,34): error TS2344: Type 'number' does not satisfy the constraint 'string'.
2727
tests/cases/compiler/genericDefaultsErrors.ts(33,52): error TS2344: Type 'T' does not satisfy the constraint 'number'.
2828
Type 'string' is not assignable to type 'number'.
2929
tests/cases/compiler/genericDefaultsErrors.ts(34,37): error TS2344: Type 'T' does not satisfy the constraint 'number'.
3030
tests/cases/compiler/genericDefaultsErrors.ts(35,32): error TS2344: Type 'number' does not satisfy the constraint 'T'.
31-
tests/cases/compiler/genericDefaultsErrors.ts(38,15): error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments
32-
tests/cases/compiler/genericDefaultsErrors.ts(39,15): error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments
33-
tests/cases/compiler/genericDefaultsErrors.ts(42,15): error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments
31+
tests/cases/compiler/genericDefaultsErrors.ts(38,15): error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments.
32+
tests/cases/compiler/genericDefaultsErrors.ts(39,15): error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments.
33+
tests/cases/compiler/genericDefaultsErrors.ts(42,15): error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments.
3434

3535

3636
==== tests/cases/compiler/genericDefaultsErrors.ts (31 errors) ====
@@ -47,7 +47,7 @@ tests/cases/compiler/genericDefaultsErrors.ts(42,15): error TS2707: Generic type
4747
!!! error TS2706: Type parameter 'U' has a circular default.
4848
declare function f02<T = U, U>();
4949
~
50-
!!! error TS2705: Required type parameters may not follow optional type parameters
50+
!!! error TS2705: Required type parameters may not follow optional type parameters.
5151
declare function f03<T extends string = number>(): void;
5252
~~~~~~
5353
!!! error TS2344: Type 'number' does not satisfy the constraint 'string'.
@@ -113,7 +113,7 @@ tests/cases/compiler/genericDefaultsErrors.ts(42,15): error TS2707: Generic type
113113
!!! error TS2706: Type parameter 'U' has a circular default.
114114
interface i04<T = U, U> { } // error
115115
~
116-
!!! error TS2705: Required type parameters may not follow optional type parameters
116+
!!! error TS2705: Required type parameters may not follow optional type parameters.
117117
interface i05<T extends string = number> { } // error
118118
~~~~~~
119119
!!! error TS2344: Type 'number' does not satisfy the constraint 'string'.
@@ -131,12 +131,12 @@ tests/cases/compiler/genericDefaultsErrors.ts(42,15): error TS2707: Generic type
131131
interface i09<T, U, V = number> { }
132132
type i09t00 = i09; // error
133133
~~~
134-
!!! error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments
134+
!!! error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments.
135135
type i09t01 = i09<1>; // error
136136
~~~~~~
137-
!!! error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments
137+
!!! error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments.
138138
type i09t02 = i09<1, 2>; // ok
139139
type i09t03 = i09<1, 2, 3>; // ok
140140
type i09t04 = i09<1, 2, 3, 4>; // error
141141
~~~~~~~~~~~~~~~
142-
!!! error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments
142+
!!! error TS2707: Generic type 'i09<T, U, V>' requires between 2 and 3 type arguments.

0 commit comments

Comments
 (0)