Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Published types: `TransactionBuilder.d.ts` imports `DeferredRedeemer`, which `stripInternal` removes

クローズ 初心者向け
#554 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
api, testing-qa

調査の方向性

packages/evolution/src/sdk/builders/RedeemerBuilder.ts、TransactionBuilder.ts の 87 行目、および packages/evolution/tsconfig.build.json から始め、stripInternal が生成される宣言にどのような影響を与えるかを調べます。skipLibCheck を無効にして TypeScript 5.9.3 で consumer の例を再現します。公開された宣言が必要な public 型を export し、consumer がエラーなしで型チェックを通過し、DeferredRedeemerData["deferred"] がもはや any でなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
22
フォーク
31
平均マージ
4日 6時間
マージ済み PR(30日)
27

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IntersectMBO/evolution-sdk のほかの issue

IntersectMBO/evolution-sdk の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。