Repository navigation
refactor(core): type unwrapTs and its each-block/index-key callers - #272
Merged
Merged
Conversation
Introduce TsExpression (estree Expression + the three TS wrapper node types the Svelte script parser emits) so unwrapTs and its direct callers in component-parse.ts and kit-module-parse.ts get real types instead of any. Generic AST walkers stay untyped for now. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR adds typed ESTree and Svelte AST handling for component expression analysis, tightens ChangesAST analysis updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
This was referenced Jul 22, 2026
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
unwrapTs/isLengthOnlyArrayCall/isIdentityFreeEach/isIndexExpression/isIndexKeyincomponent-parse.tsnow use real types (TsExpression,AST.EachBlock,estree'sExpression) instead ofany.isParentCall/isBodyParseCallinkit-module-parse.tsgained aproperty.type === 'Identifier'narrowing thatunwrapTs's new return type now forces.vite-config-parse.tsneeded no changes — its call sites passanyintounwrapTs, which is still valid.walkEstree) and the rest of these three files stay on the existingNode = anyalias; this is intentionally the smallest safe slice, per prior discussion.@types/estreeas acoredevDependency (catalog-pinned) so the package's own tsconfig resolves theestreetypes it now imports.Test plan
pnpm buildpnpm typecheckpnpm testpnpm lintpnpm check:publishpackages/action/distrebuilt and included🤖 Generated with Claude Code
Summary by CodeRabbit