Skip to content

Commit 0660059

Browse files
Add ts2719 to known errors (#220)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent c01c9e0 commit 0660059

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

source/lib/compiler.ts

+1
Original file line numberDiff line numberDiff 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

6465
type IgnoreDiagnosticResult = 'preserve' | 'ignore' | Location;

source/lib/interfaces.ts

+1
Original file line numberDiff line numberDiff 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,

source/test/fixtures/expect-error/missing-diagnostic-code/index.test-d.ts

+13
Original file line numberDiff line numberDiff 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.'
88
expectError(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+
})

0 commit comments

Comments
 (0)