Skip to content

Commit 359930a

Browse files
authored
Use qutemarks around new instead of ticks around new in diagnostic (microsoft#27106)
* Use qutemarks around new instead of ticks * Accept baselines
1 parent 20eafb5 commit 359930a

6 files changed

+9
-9
lines changed

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3751,7 +3751,7 @@
37513751
"category": "Message",
37523752
"code": 6212
37533753
},
3754-
"Did you mean to use `new` with this expression?": {
3754+
"Did you mean to use 'new' with this expression?": {
37553755
"category": "Message",
37563756
"code": 6213
37573757
},

tests/baselines/reference/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts(2
2020
~~~
2121
!!! error TS2322: Type 'typeof Bar' is not assignable to type 'Bar'.
2222
!!! error TS2322: Property 'x' is missing in type 'typeof Bar'.
23-
!!! related TS6213 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:10:8: Did you mean to use `new` with this expression?
23+
!!! related TS6213 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:10:8: Did you mean to use 'new' with this expression?
2424
y: Date
2525
~~~~
2626
!!! error TS2322: Type 'DateConstructor' is not assignable to type 'Date'.
2727
!!! error TS2322: Property 'toDateString' is missing in type 'DateConstructor'.
28-
!!! related TS6213 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:11:8: Did you mean to use `new` with this expression?
28+
!!! related TS6213 tests/cases/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:11:8: Did you mean to use 'new' with this expression?
2929
}, getNum());
3030

3131
foo({

tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.
2828
~
2929
!!! error TS2322: Type 'typeof B' is not assignable to type 'A'.
3030
!!! error TS2322: Property 'prop' is missing in type 'typeof B'.
31-
!!! related TS6213 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:13:5: Did you mean to use `new` with this expression?
31+
!!! related TS6213 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:13:5: Did you mean to use 'new' with this expression?
3232
a = C;
3333

3434
var b: B = new C(); // error prop is missing
@@ -39,7 +39,7 @@ tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.
3939
~
4040
!!! error TS2322: Type 'typeof B' is not assignable to type 'B'.
4141
!!! error TS2322: Property 'prop' is missing in type 'typeof B'.
42-
!!! related TS6213 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:17:5: Did you mean to use `new` with this expression?
42+
!!! related TS6213 tests/cases/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.ts:17:5: Did you mean to use 'new' with this expression?
4343
b = C;
4444
b = a;
4545

tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon
6363
~
6464
!!! error TS2322: Type 'typeof A' is not assignable to type 'A'.
6565
!!! error TS2322: Property 'foo' is missing in type 'typeof A'.
66-
!!! related TS6213 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:37:8: Did you mean to use `new` with this expression?
66+
!!! related TS6213 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:37:8: Did you mean to use 'new' with this expression?
6767
b: B
6868
~
6969
!!! error TS2322: Type 'typeof B' is not assignable to type 'A'.
7070
!!! error TS2322: Property 'foo' is missing in type 'typeof B'.
71-
!!! related TS6213 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:38:8: Did you mean to use `new` with this expression?
71+
!!! related TS6213 tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations2.ts:38:8: Did you mean to use 'new' with this expression?
7272
}

tests/baselines/reference/typeMatch1.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tests/cases/compiler/typeMatch1.ts(20,1): error TS2367: This condition will alwa
3131
~
3232
!!! error TS2322: Type 'typeof C' is not assignable to type 'C'.
3333
!!! error TS2322: Property 'x' is missing in type 'typeof C'.
34-
!!! related TS6213 tests/cases/compiler/typeMatch1.ts:19:4: Did you mean to use `new` with this expression?
34+
!!! related TS6213 tests/cases/compiler/typeMatch1.ts:19:4: Did you mean to use 'new' with this expression?
3535
C==D;
3636
~~~~
3737
!!! error TS2367: This condition will always return 'false' since the types 'typeof C' and 'typeof D' have no overlap.

tests/baselines/reference/weakType.errors.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tests/cases/compiler/weakType.ts(62,5): error TS2322: Type '{ properties: { wron
3737
doSomething(null as CtorOnly);
3838
~~~~~~~~~~~~~~~~
3939
!!! error TS2560: Value of type 'CtorOnly' has no properties in common with type 'Settings'. Did you mean to call it?
40-
!!! related TS6213 tests/cases/compiler/weakType.ts:17:13: Did you mean to use `new` with this expression?
40+
!!! related TS6213 tests/cases/compiler/weakType.ts:17:13: Did you mean to use 'new' with this expression?
4141
doSomething(12);
4242
~~
4343
!!! error TS2559: Type '12' has no properties in common with type 'Settings'.

0 commit comments

Comments
 (0)