Skip to content

Commit f17b96f

Browse files
Add ts2551 to known errors (#209)
1 parent 57d5bee commit f17b96f

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

source/lib/compiler.ts

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const expectErrorDiagnosticCodesToIgnore = new Set<DiagnosticCode>([
5656
DiagnosticCode.RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsY,
5757
DiagnosticCode.RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsAtLeastY,
5858
DiagnosticCode.AcceptsTooFewArgumentsToBeUsedAsDecoratorHere,
59+
DiagnosticCode.PropertyDoesNotExistOnTypeDidYouMean,
5960
]);
6061

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

source/lib/interfaces.ts

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export enum DiagnosticCode {
4242
PropertyDoesNotExistOnType = 2339,
4343
ArgumentTypeIsNotAssignableToParameterType = 2345,
4444
CannotAssignToReadOnlyProperty = 2540,
45+
PropertyDoesNotExistOnTypeDidYouMean = 2551,
4546
ExpectedArgumentsButGotOther = 2554,
4647
ExpectedAtLeastArgumentsButGotOther = 2555,
4748
TypeHasNoPropertiesInCommonWith = 2559,

source/test/fixtures/expect-error/values/index.test-d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ expectError(() => {
3838
triggerSuggestion.fooOrBar = 'fooo';
3939
})
4040

41+
expectError(triggerSuggestion.fooOrBars);
42+
4143
expectError(() => {
4244
const foo: ReadonlyKeys = {
4345
bar: 'baz',

0 commit comments

Comments
 (0)