Skip to content

Suggestion: add config excludeTypes #17242

Closed
@k8w

Description

@k8w

TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)
2.4.0

Code

This is a frontend project.

let timer: number = setTimeout(()=>{}, 1000);
npm i @types/protobufjs

Expected behavior:
Compile success

Actual behavior:
Compile error for type of timer not match that in @types/node

@types/node is a dependency that @types/protobufjs need.
But in frontend project, it always be brought by some lib (maybe can run both at browser and server)

Need some way to exclude @types/node for frontend project.

So suggest this:

{
  ..
  excludeTypes: ['@types/node']
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions