-
Notifications
You must be signed in to change notification settings - Fork 12.8k
JSDoc @implements tag/clause not checked #30156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
also see #17498, though it doesn't have the clearest initial comment describing the problem :) |
FYI this does work with an |
I attempted this with a TS interface Test
{
func(n: number): void
} /** @implements {Test} */
class MyTest
{
func(n) // `n` is implicit any
{
}
} EDIT: okay, so it technically does work (in that MyTest can be passed to things expecting a Test, and as long as you don't re-declare it you will see the inherited type), but "func" doesn't auto-inherit the documentation or type annotations. I think that's a different issue though? maybe? |
Piggybacking on this. I thought I would get my answer in this thread, but also having this issue. Tried |
Workaround, based on this comment. class MyStoreImpl {
constructor() {
// Verify that the class implements the interface.
void (/** @type {import('./types').MyStore} */ (this));
}
} |
Hello, have you solved this problem
vscode IntelliSense not working |
+1. Still hitting this problem in TypeScript 4.9.2 as well as TypeScript 5.0. |
+1. |
Expected: At least an error on C1
Actual: Neither of these error
The text was updated successfully, but these errors were encountered: