Repository navigation
refactor: 全项目 TypeScript 重构 - #4
Merged
Merged
Conversation
将所有 .mjs 源文件和测试文件迁移到 TypeScript: - 新增 src/types.ts 共享类型定义(Matrix, ViewBox, LayerDescriptor, TextInfo 等) - 所有 src/, web/, test/ 下 .mjs → .ts,添加完整类型注解 - 新增 tsconfig.json(Node16 模块)和 web/tsconfig.json(Bundler 模式) - package.json 更新:tsx 运行入口,新增 typecheck 脚本 - 全部 155 个测试通过 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- ImageData 工厂添加 colorSpace 属性 - writePsdBuffer 参数先转 unknown 再转目标类型 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.mjs源文件(18 个)和测试文件(16 个)迁移为 TypeScript.tssrc/types.ts共享类型定义(Matrix, ViewBox, LayerDescriptor, TextInfo, RenderResult 等)tsconfig.json(Node16 模块解析)和web/tsconfig.json(Bundler 模式,含 DOM 类型)package.json更新:使用tsx运行 CLI 入口,新增typecheck脚本Test plan
pnpm test— 16 个测试文件、155 个用例全部通过pnpm run typecheck— TypeScript 类型检查pnpm run dev— Web App 开发服务器正常启动pnpm run build:web— Web App 构建成功🤖 Generated with Claude Code