egoist / egoist/tsup

Add ability to not fail on `dts` errors.

Open
#1,339 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
11.3k
Forks
274
PR merge metrics
No merged PRs in 30d

Description

It would be really nice to have the ability to not fail on type errors during dts generation.

For example, add the ability to force set "noEmitOnError": false

Context:

  • we have a lot of type-errors during d.ts generation only but these errors don't affect the result d.ts file.

Right now the noEmitOnError: true overrides the one passed by a user:

 ...compilerOptions,
noEmitOnError: true,

https://github.com/egoist/tsup/blob/92ee84251f7c5dad7691f6052eb8b767899e0cff/src/rollup.ts#L106-L123

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/rollup.ts around lines 106-123, where compilerOptions and noEmitOnError are handled during d.ts generation. Trace how the user-provided option is overridden and identify the existing d.ts generation path to verify the behavior. Done means users can explicitly set noEmitOnError to false without d.ts generation failing on type errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.