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 * as namespace
@implements
cannot be used as a value because it was imported using 'import type'
implements
every-ts
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
// @allowJs // @checkJs // @filename: namespace.ts export interface Fooable { foo(): void; } // @filename: ts-import.ts import type * as NS from "./namespace"; export class ThingThatCanFoo implements NS.Fooable {} // @filename: js-import.js /** * @import * as NS from './namespace' */ /** @implements {NS.Fooable} */ export class ThingThatCanFoo {}
/** @implements {NS.Fooable} */
'NS' cannot be used as a value because it was imported using 'import type'.
ThingThatCanFoo
Fooable
implements NS.Fooable
Notably, in the JSDoc version, using a non-type import removes the error:
import * as NS from "./namespace";
However, this causes a runtime import that's only used for type information.
Related issues
import type
@import
The text was updated successfully, but these errors were encountered:
@import * as namespace' cannot be used with
@import * as namespace'
Successfully merging a pull request may close this issue.
π 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: