Skip to content

Typescript parse5 with WTF typings #344

@c0ncentus

Description

@c0ncentus

hi,

image

WTF ?
How do you know if the child have no child (html string) ? Do you spying my files ? 👎

So I must put "as" everywhere

because parser5 say "if you are a child, you have no child", and "if you are a perent then you have no parent". Is why parse5's typings sucks.

image

Okay AST is complex but it's why you should allow one type and make available Parent and Child types

type Node = ParentNode | ChildNode

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