egoist / egoist/tsup

`dts: true` result error

Open
#1,195 0 comments 0 reactions 0 assignees View on GitHub
need repro
Dominant language
TypeScript
Stars
11.3k
Forks
274
PR merge metrics
No merged PRs in 30d

Description

`npm run build` gives me error like below

```bash
Error parsing: ...
Error: error occured in dts build
at Worker. (./node_modules/tsup/dist/index.js:1539:26)
at Worker.emit (node:events:517:28)
at MessagePort. (node:internal/worker:243:53)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:757:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28)
DTS Build error
```

```typescript
type ProtocolParameterSchemaType = {
a: string;
b: string;
c: string;
d: string;
e: {
paymentCredential:
| {
VerificationKeyHash: {
hash: string;
};
}
| {
ScriptHash: {
hash: string;
};
};
stakeCredential: {
inline:
| {
VerificationKeyHash: {
hash: string;
};
}
| {
ScriptHash: {
hash: string;
};
};
} | null;
};
f: bigint;
g: string;
h: Data[];
};
```

Contributor guide

Open the contributing guide

Research direction

Start by running `npm run build` with the reported `ProtocolParameterSchemaType` example and inspect the resulting DTS build error from tsup. Determine whether the declaration build can process this type; done means the reproduction builds successfully or the failure is reported with a clear, actionable diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.