Skip to content

[BUG] Version 9.0.0 introduced TS2502 TypeScript type errors #316

Description

@jrpool

Version: 9.0.0

Error: TS2502 on 6 symbols in dist/index.d.ts (lines 378–383): HTMLElement, CommentNode, valid, Node, TextNode, NodeType — all "referenced directly or indirectly in its own type annotation".

Likely cause: The build tool switched from tsc to tsdown in 9.0.0, which appears to generate self-referential type declarations.

Reproduction: Import node-html-parser in a TypeScript project with strict: true and no skipLibCheck, run tsc.

Workaround: skipLibCheck: true in tsconfig.json, or pin to ^8.

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