Repository navigation
refactor(core): 型を外していた as を 2 つ外す - #81
Merged
Merged
Conversation
- rules.ts: queue.shift() as string をやめ、undefined なら抜ける - valSourceDiff.ts: ReadonlyMap を as Map で書き換えていたのをやめ、新しい Map で置き直す Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
as const以外のasを数えたら 6 件あり、そのうち型を外しているだけの 2 件を直す。packages/core/src/compatibility/rules.ts: 幅優先のqueue.shift() as stringをやめ、undefinedなら抜ける。queue.length > 0の確認と同じ意味で、!と同じことをしていたpackages/core/src/diff/valSourceDiff.ts:ReadonlyMapのattributesをas Mapで書き換えていたのをやめ、新しいMapを作ってparametersに置き直す。読み取り専用の約束を破っていた残りの 4 件は
seamlint/geometryReport.tsの、unknownを受けてガードで確かめる箇所で、そのままにする。pnpm typecheckとpnpm test(core 476 / cli 165)は green。lint も通る。Prettier は元ファイルが未整形だったため、関係ない行が変わるのを避けて当てていない。🤖 Generated with Claude Code