Skip to content

False positive with JSDoc imports#27

Description

@regseb

When the JSDoc import of a type is used, dead-code-checker reports that the type isn't used.

  • foo.js

    export class Foo {};
  • index.js

    /**
     * @import { Foo } from "./foo.js"
     */
    
    /**
     * @type {Foo}
     */
    const foo;

npx dead-code-checker -f .

...
馃搧 index.js (2 items):
聽聽聽聽馃摜 import Foo (imported but not used)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions