diff --git a/source/lib/compiler.ts b/source/lib/compiler.ts index 7c06a7f0..02a9537e 100644 --- a/source/lib/compiler.ts +++ b/source/lib/compiler.ts @@ -56,6 +56,7 @@ const expectErrorDiagnosticCodesToIgnore = new Set([ DiagnosticCode.RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsY, DiagnosticCode.RuntimeWillInvokeDecoratorWithXArgumentsButDecoratorExpectsAtLeastY, DiagnosticCode.AcceptsTooFewArgumentsToBeUsedAsDecoratorHere, + DiagnosticCode.PropertyDoesNotExistOnTypeDidYouMean, ]); type IgnoreDiagnosticResult = 'preserve' | 'ignore' | Location; diff --git a/source/lib/interfaces.ts b/source/lib/interfaces.ts index f48de480..46b22071 100644 --- a/source/lib/interfaces.ts +++ b/source/lib/interfaces.ts @@ -42,6 +42,7 @@ export enum DiagnosticCode { PropertyDoesNotExistOnType = 2339, ArgumentTypeIsNotAssignableToParameterType = 2345, CannotAssignToReadOnlyProperty = 2540, + PropertyDoesNotExistOnTypeDidYouMean = 2551, ExpectedArgumentsButGotOther = 2554, ExpectedAtLeastArgumentsButGotOther = 2555, TypeHasNoPropertiesInCommonWith = 2559, diff --git a/source/test/fixtures/expect-error/values/index.test-d.ts b/source/test/fixtures/expect-error/values/index.test-d.ts index 70bc65f7..16a94c6c 100644 --- a/source/test/fixtures/expect-error/values/index.test-d.ts +++ b/source/test/fixtures/expect-error/values/index.test-d.ts @@ -38,6 +38,8 @@ expectError(() => { triggerSuggestion.fooOrBar = 'fooo'; }) +expectError(triggerSuggestion.fooOrBars); + expectError(() => { const foo: ReadonlyKeys = { bar: 'baz',