Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

已关闭 适合新手
#554 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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 如何影响生成的声明。使用 TypeScript 5.9.3 并禁用 skipLibCheck 重现 consumer 示例。完成的标准是:已发布的声明导出所需的公共类型,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
派生
33
平均合并
2 天 5 小时
30 天内合并 PR
41

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

IntersectMBO/evolution-sdk 的其他 Issue

查看 IntersectMBO/evolution-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。