Summary
The type declarations published in 0.5.14 don't type-check; the sources are unchanged on main at 714a6da.
dist/sdk/builders/TransactionBuilder.d.ts imports DeferredRedeemer from ./RedeemerBuilder.js, but RedeemerBuilder.d.ts doesn't export it.
- In
RedeemerBuilder.ts, DeferredRedeemer is marked /** @internal */, and packages/evolution/tsconfig.build.json sets "stripInternal": true. The declaration is removed, while the import in TransactionBuilder.ts (line 87) stays.
Reproduce
package.json: "@evolution-sdk/evolution": "0.5.14", "typescript": "5.9.3"
tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"noEmit": true,
"skipLibCheck": false
},
"include": ["index.ts"]
}
index.ts:
import * as Evolution from "@evolution-sdk/evolution"
export const sdk = Evolution
Then run npx tsc -p .
Expected
No errors.
Actual
node_modules/@evolution-sdk/evolution/dist/sdk/builders/TransactionBuilder.d.ts(54,15): error TS2305: Module '"./RedeemerBuilder.js"' has no exported member 'DeferredRedeemer'.
Notes
- It is the only such error. Type-checking all 222
.d.ts files in dist reports just this one.
- With
skipLibCheck: true the build passes, but silently. The unresolved import becomes any, so DeferredRedeemerData["deferred"] is any for consumers. DeferredRedeemerData is documented as public (@since 2.0.0, @category state), and TxBuilderState.deferredRedeemers uses it.
- Restoring four declarations fixes it. I restored the four
@internal type declarations from RedeemerBuilder.ts (StaticRedeemer, SelfRedeemer, BatchRedeemer and DeferredRedeemer) into the published RedeemerBuilder.d.ts. Both the consumer above and all 222 files then type-check, and deferred is typed again. toDeferredRedeemer can stay internal. So dropping @internal from those four types is enough, unless DeferredRedeemerData isn't meant to be public after all.
- CI could catch this kind of break. A consumer compiled with
skipLibCheck: false would do it.
Investigated with AI assistance (Claude Code); the reproduction above was run with TypeScript 5.9.3 against 0.5.14.
Summary
The type declarations published in 0.5.14 don't type-check; the sources are unchanged on
mainat 714a6da.dist/sdk/builders/TransactionBuilder.d.tsimportsDeferredRedeemerfrom./RedeemerBuilder.js, butRedeemerBuilder.d.tsdoesn't export it.RedeemerBuilder.ts,DeferredRedeemeris marked/** @internal */, andpackages/evolution/tsconfig.build.jsonsets"stripInternal": true. The declaration is removed, while the import inTransactionBuilder.ts(line 87) stays.Reproduce
package.json:"@evolution-sdk/evolution": "0.5.14","typescript": "5.9.3"tsconfig.json:{ "compilerOptions": { "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", "strict": true, "noEmit": true, "skipLibCheck": false }, "include": ["index.ts"] }index.ts:Then run
npx tsc -p .Expected
No errors.
Actual
Notes
.d.tsfiles indistreports just this one.skipLibCheck: truethe build passes, but silently. The unresolved import becomesany, soDeferredRedeemerData["deferred"]isanyfor consumers.DeferredRedeemerDatais documented as public (@since 2.0.0,@category state), andTxBuilderState.deferredRedeemersuses it.@internaltype declarations fromRedeemerBuilder.ts(StaticRedeemer,SelfRedeemer,BatchRedeemerandDeferredRedeemer) into the publishedRedeemerBuilder.d.ts. Both the consumer above and all 222 files then type-check, anddeferredis typed again.toDeferredRedeemercan stay internal. So dropping@internalfrom those four types is enough, unlessDeferredRedeemerDataisn't meant to be public after all.skipLibCheck: falsewould do it.Investigated with AI assistance (Claude Code); the reproduction above was run with TypeScript 5.9.3 against 0.5.14.