types: Fix svelte-check issues in Brush.svelte#486
Merged
Conversation
- Add <script module> block to export Brush type (fixes brush.test.svelte import) - Remove duplicate local Brush type definition - Change $derived type from BrushMarkProps to Omit<BrushMarkProps, 'brush'> since brush is already destructured from $props() - Remove erroneous data destructuring (not a BrushMarkProps property) - Cast xScaleFn.invert()/yScaleFn.invert() results as number | Date throughout (PlotScaleFunction.invert returns RawValue which is too broad) - Add explicit return type [number | Date, number | Date, ActionType] to swapIfNeeded() to enable proper tuple destructuring - Cast onpointerdown/onpointermove as any when passing to Frame (Brush's (e: MouseEvent) handlers don't match MarkEventHandler signature) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for svelteplot ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-486
# or install the specific version
npm install svelteplot@0.10.3-pr-486.0 |
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.
resolves #442
Summary
src/lib/marks/Brush.svelte(12 errors → 0) andsrc/tests/brush.test.svelte(1 error → 0)Brushtype via a<script module>block so it can be imported by tests and consumersinvert()return casts fromRawValuetonumber | DatethroughoutswapIfNeeded()to fix destructuring type inferenceTest plan
pnpm check— no errors inBrush.svelteorbrush.test.sveltepnpm lint— passes (Prettier + ESLint)pnpm test— all 666 tests pass🤖 Generated with Claude Code