File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
test/fixtures/expect-error/missing-diagnostic-code Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ const expectErrorDiagnosticCodesToIgnore = new Set<DiagnosticCode>([
5959 DiagnosticCode . AcceptsTooFewArgumentsToBeUsedAsDecoratorHere ,
6060 DiagnosticCode . PropertyDoesNotExistOnTypeDidYouMean ,
6161 DiagnosticCode . ErrorIsOfTypeUnknown ,
62+ DiagnosticCode . TwoDifferentTypesSameName ,
6263] ) ;
6364
6465type IgnoreDiagnosticResult = 'preserve' | 'ignore' | Location ;
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ export enum DiagnosticCode {
5858 IndexSignatureOnlyPermitsReading = 2542 ,
5959 NoOverloadExpectsCountOfArguments = 2575 ,
6060 ThisContextOfTypeNotAssignableToMethodOfThisType = 2684 ,
61+ TwoDifferentTypesSameName = 2719 ,
6162 Type1IsMissingPropertiesFromType2Variant1 = 2739 ,
6263 Type1IsMissingPropertiesFromType2Variant2 = 2740 ,
6364 PropertyMissingInType1ButRequiredInType2 = 2741 ,
Original file line number Diff line number Diff line change @@ -6,3 +6,16 @@ expectError(one('foo', 'bar'));
66
77// 'Found an error that tsd does not currently support (`ts2304`), consider creating an issue on GitHub.'
88expectError ( undeclared = one ( 'foo' , 'bar' ) ) ;
9+
10+ // ts2719
11+ interface T { }
12+ declare const a : T ;
13+ expectError ( class Foo < T > {
14+ x : T ;
15+ constructor ( a : T ) {
16+ this . x = a ;
17+ }
18+ fn ( ) {
19+ this . x = a ;
20+ }
21+ } )
You can’t perform that action at this time.
0 commit comments