Skip to content

Commit

Permalink
Add ts2551 to known errors (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-mitchell authored Feb 23, 2024
1 parent 57d5bee commit f17b96f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/lib/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const expectErrorDiagnosticCodesToIgnore = new Set<DiagnosticCode>([
DiagnosticCode.RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsY,
DiagnosticCode.RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsAtLeastY,
DiagnosticCode.AcceptsTooFewArgumentsToBeUsedAsDecoratorHere,
DiagnosticCode.PropertyDoesNotExistOnTypeDidYouMean,
]);

type IgnoreDiagnosticResult = 'preserve' | 'ignore' | Location;
Expand Down
1 change: 1 addition & 0 deletions source/lib/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export enum DiagnosticCode {
PropertyDoesNotExistOnType = 2339,
ArgumentTypeIsNotAssignableToParameterType = 2345,
CannotAssignToReadOnlyProperty = 2540,
PropertyDoesNotExistOnTypeDidYouMean = 2551,
ExpectedArgumentsButGotOther = 2554,
ExpectedAtLeastArgumentsButGotOther = 2555,
TypeHasNoPropertiesInCommonWith = 2559,
Expand Down
2 changes: 2 additions & 0 deletions source/test/fixtures/expect-error/values/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ expectError(() => {
triggerSuggestion.fooOrBar = 'fooo';
})

expectError(triggerSuggestion.fooOrBars);

expectError(() => {
const foo: ReadonlyKeys = {
bar: 'baz',
Expand Down

0 comments on commit f17b96f

Please sign in to comment.