Skip to content

types: Fix svelte-check issues in Line.svelte#484

Merged
gka merged 1 commit into
mainfrom
fix/svelte-check-line
Feb 22, 2026
Merged

types: Fix svelte-check issues in Line.svelte#484
gka merged 1 commit into
mainfrom
fix/svelte-check-line

Conversation

@gka

@gka gka commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

Resolves #437

Summary

  • Fixes all svelte-check type errors in src/lib/marks/Line.svelte (26 errors → 0)
  • Replaces callWithProps(line, []) with the fluent line<ScaledDataRecord>() API to fix generic type inference
  • Switches MarkerPath props from broad-typed args.xxx to properly-typed options.xxx with correct casts
  • Fixes null/undefined mismatches for dInv, style, text, startOffset, textStyle props passed to MarkerPath
  • Adds explicit types to internal variables in groupIndex() and sphereLine()
  • No runtime behavior changes

Test plan

  • pnpm check — no errors in Line.svelte
  • pnpm lint — passes (Prettier + ESLint)
  • pnpm lint:types — no errors in Line.svelte
  • pnpm test — all 666 tests pass

🤖 Generated with Claude Code

- Use undefined instead of null in DEFAULTS for class/lineClass
- Add explicit types to groupIndex() group/groups variables
- Replace callWithProps with fluent d3 line<ScaledDataRecord>() API to fix generic type inference
- Cast sphereLine() result to D3Line<ScaledDataRecord>
- Add tension ?? 0 fallback to maybeCurve call
- Add explicit ScaledDataRecord types to line generator lambdas
- Type sphereLine projection as any, inner line/lines arrays explicitly
- Add null fallback for outlineStrokeWidth resolveProp result
- Remove duplicate textAnchor key from pick() call
- Switch MarkerPath props from broad-typed args.xxx to options.xxx with proper casts
- Fix null vs undefined for dInv, style, text, startOffset, textStyle props
- Pass lineData[0].datum (not lineData[0]) to resolveProp for lineClass
- Add missing required transform prop to MarkerPath

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@netlify

netlify Bot commented Feb 22, 2026

Copy link
Copy Markdown

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 96a7bee
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/699b02e1fb4c240008c9a81e
😎 Deploy Preview https://deploy-preview-484--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-484.0

Install it with:

npm install svelteplot@pr-484
# or install the specific version
npm install svelteplot@0.10.3-pr-484.0

@gka gka merged commit c780b9d into main Feb 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[svelte-check] Fix errors in src/lib/marks/Line.svelte

1 participant