Skip to content

@types/react-dom should not have dependency @types/node #21310

@k8w

Description

@k8w

If you know how to fix the issue, make a pull request instead.

If you do not mention the authors the issue will be ignored.

@types/react-dom have a dependency @types/node, it will bring some problem.
Some types are different in NodeJS and browser, for example:

let timer: number = setTimeout(()=>{}, 100)

This should be compiled sucessfully, but get error Type 'Timer' is not assignable to type 'number'. if @types/node is exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions