@import * as namespace
cannot be used with @implements
#60563
Labels
Milestone
@import * as namespace
cannot be used with @implements
#60563
π Search Terms
cannot be used as a value because it was imported using 'import type'
implements
π Version & Regression Information
every-ts
failed to build them.β― Playground Link
https://www.typescriptlang.org/dev/bug-workbench/?checkJs=true&allowJs=true&moduleResolution=3&target=9&module=100&ts=5.6.3#code/PTAEAEEMBtoewO4CkDOAoEEDGALAplgNapoZjgBmAltHgHaQC2eAXKA8ygA6RZ4B0AF3R4AHlzgAnQaCp1BeSRV55QAMThxIAI1qgA3mlCgKmgBQBKNgDc4VACYBuNAF9SZCNVodWoYQFoqRglpIXQgkJlBAE8uVQAqUEgUUAA5AGUTSThGUAAifmAfbhU85zQxSNAsaGSUgBUcOQBzRshBAGFIOg04WWDaZnkUjP5enT19N1JMShp6Jl8AKxRA4KlBfhWMePijRPAIjdBE5LTMimzcgHJC4p4+a-3gGd2ICMH6YQNR8d08FwnF6VY41OqgRotNqdbq9AxuIA
π» Code
π Actual behavior
/** @implements {NS.Fooable} */
has error:'NS' cannot be used as a value because it was imported using 'import type'.
ThingThatCanFoo
correctly report that they do not fully implementFooable
.π Expected behavior
/** @implements {NS.Fooable} */
should not have an error, exactly likeimplements NS.Fooable
above.ThingThatCanFoo
should still report that they do not fully implementFooable
.Additional information about the issue
Notably, in the JSDoc version, using a non-type import removes the error:
However, this causes a runtime import that's only used for type information.
Related issues
import type
in TS instead of@import
in JSDoc)The text was updated successfully, but these errors were encountered: