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
{{ message }}
Repository navigation
Bad error when using import() type within JSDoc tag @implementsΒ #58542
@implements uses the same grammar as Typescript implements. This is an error in Typescript:
classAimplementsimport("a").B{}
However, the error is informative in typescript: "A class can only implement an identifier..." and not in Javascript. Javascript should give the same error.
With the new @import tag, you should be able to /** @import { B } from 'a' */ instead of using @typedef.
changed the title [-]Error when using `import()` type within JSDoc tag `@implements`[/-][+]Bad error when using `import()` type within JSDoc tag `@implements`[/+]on Jun 17, 2024
Activity
sandersn commentedon Jun 17, 2024
@implementsuses the same grammar as Typescript implements. This is an error in Typescript:However, the error is informative in typescript: "A class can only implement an identifier..." and not in Javascript. Javascript should give the same error.
With the new
@importtag, you should be able to/** @import { B } from 'a' */instead of using@typedef.[-]Error when using `import()` type within JSDoc tag `@implements`[/-][+]Bad error when using `import()` type within JSDoc tag `@implements`[/+]Make @implements/@extends parse more like TS
jaydenseric commentedon Sep 25, 2024
See also #49905 .