You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportinterfaceITest{a(): void;b(): void;}exportclassTestimplementsITest{// @ts-expect-errorpublica(k: string): void{}// method b is missing, but no errors reported}
π Actual behavior
No error reported even missing a method in the class
π Expected behavior
Should report errors if any method is not implemented in class
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
ts-expect-error is not the culprit here, you also don't get the error you expect when you remove it. The compiler doesn't check if your class implements the interface when there's already an error inside your class. Using ts-expect-error does not remove the error and let the compiler happily continue its job, it just hides the error.
π Search Terms
ts-expect-error missing method
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.3#code/KYDwDg9gTgLgBASwHY2FAZgQwMbDgSQBVgBneAbwChK5a5MAKASgC44A3CBAEwG5q6cAEbM2nHvwC+1UJFhxsAG0wkScYmUQBbMIuBbgKNUVIUBdAPQW4AARgkAtLODYYTqFGg06YAK5DFBGx6BgBrNjIoZABzVg4ubjhyaWkgA
π» Code
π Actual behavior
No error reported even missing a method in the class
π Expected behavior
Should report errors if any method is not implemented in class
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: