We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import()
@implements
import
2304
https://www.typescriptlang.org/play/?ts=5.5.0-beta&filetype=js#code/PQKhAIAEEsFsAcA2BTWyB2AXAzuA3nPAPYBOmAFAEQCGlAlAHQBCAvuCMAFADGi12uAIL4WQA
/** @implements {import("a").B} */ class A {}
Two TypeScript errors:
Cannot find name 'import'.
'}' expected.
TypeScript should allow using import() types within the type of the JSDoc tag @implements.
A workaround is to use a JSDoc @typedef to import the type under an alias, and then use that alias within the JSDoc tag @implements type, e.g:
@typedef
/** @typedef {import("a").B} B */ /** @implements {B} */ class A {}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
π Search Terms
import
@implements
2304
π Version & Regression Information
@implements
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.0-beta&filetype=js#code/PQKhAIAEEsFsAcA2BTWyB2AXAzuA3nPAPYBOmAFAEQCGlAlAHQBCAvuCMAFADGi12uAIL4WQA
π» Code
π Actual behavior
Two TypeScript errors:
Cannot find name 'import'.
(2304)'}' expected.
(2304)π Expected behavior
TypeScript should allow using
import()
types within the type of the JSDoc tag@implements
.Additional information about the issue
A workaround is to use a JSDoc
@typedef
to import the type under an alias, and then use that alias within the JSDoc tag@implements
type, e.g:The text was updated successfully, but these errors were encountered: