Skip to content

types: Fix svelte-check issues in remaining marks#490

Merged
gka merged 6 commits intomainfrom
types/fix-remaining-mark-issues
Feb 23, 2026
Merged

types: Fix svelte-check issues in remaining marks#490
gka merged 6 commits intomainfrom
types/fix-remaining-mark-issues

Conversation

@gka
Copy link
Copy Markdown
Contributor

@gka gka commented Feb 23, 2026

resolves #423
resolves #428
resolves #429
resolves #430
resolves #432
resolves #435
resolves #441
resolves #450

Summary

  • Fixes all svelte-check type errors in src/lib/marks/: Cell, CustomMarkHTML, DifferenceY, Dot, Geo, HTMLTooltip, Pointer, and Vector
  • Replaces @ts-expect-error with @ts-ignore for .svelte imports in test files, resolving a conflict where svelte-check and tsc disagreed on whether the directive was needed

Key fixes

  • Cell: move type prop after {...args} spread to prevent LinkableMarkProps.type from overriding it
  • CustomMarkHTML: fix Snippet<[T]> tuple form; cast frameAnchor to string
  • DifferenceY: fix className null default; cast resolveChannel returns in extent()/max()/min() calls; cast comparisons and fillOpacity
  • Dot: add parameter types to getSymbolPath; cast data as any[]; add missing {plot} prop to DotCanvas; cast options/args in Anchor and event handlers
  • Geo: type pointRadius callback; cast data as any[]; cast args in resolveStyles/addEventHandlers; fix geometry type handling
  • HTMLTooltip: fix parentElement/firstChild types; type datum state as Datum | false; add quadtree<Datum>() type param
  • Pointer: fix data/onupdate defaults; fix parentElement/firstChild types; cast symbol-indexed accesses; type groups/selectedData
  • Vector: fix data default; cast indexData result; use {...(args as any)} spread; cast resolveProp/addEventHandlers

Test files

Replaces @ts-expect-error with @ts-ignore on .svelte imports — @ts-expect-error requires an error to suppress (fails in tsc which doesn't error), while @ts-ignore silently suppresses when present but doesn't complain when absent (satisfies both svelte-check and tsc).

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 23, 2026

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 9f88265
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/699cd9a376545400080c4fc2
😎 Deploy Preview https://deploy-preview-490--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-490.0

Install it with:

npm install svelteplot@pr-490
# or install the specific version
npm install svelteplot@0.10.3-pr-490.0

gka and others added 5 commits February 23, 2026 23:32
…Dot, Geo, HTMLTooltip, Pointer, and Vector

- Cell: move `type` prop after `{...args}` spread to avoid LinkableMarkProps.type conflict
- CustomMarkHTML: fix Snippet type tuple form and frameAnchor string cast
- DifferenceY: fix className null default, extent/max/min casts, comparison operators, fillOpacity cast
- Dot: add explicit types to getSymbolPath, data cast, add plot prop to DotCanvas, Anchor/addEventHandlers casts
- Geo: add explicit type to pointRadius callback, data cast, Anchor/resolveStyles/addEventHandlers casts, geometry type handling
- HTMLTooltip: fix parentElement/firstChild types, datum state type, quadtree<Datum>() type param, datum cast in render
- Pointer: fix data/onupdate defaults, parentElement/firstChild types, symbol indexing casts, groups/selectedData types
- Vector: fix data default, indexData/Mark spread casts, resolveProp/addEventHandlers casts
- tests: remove now-unused @ts-expect-error directives (marks are now properly typed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tests

@ts-expect-error causes a conflict: svelte-check sees an error on the
.svelte import line (making the directive valid), while tsc does not
(making it report "Unused '@ts-expect-error' directive").

@ts-ignore suppresses errors when present but does not complain when
there is no error, resolving the conflict between both checkers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gka gka force-pushed the types/fix-remaining-mark-issues branch from 16f7e84 to 3575e86 Compare February 23, 2026 22:32
@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-490.1

Install it with:

npm install svelteplot@pr-490
# or install the specific version
npm install svelteplot@0.10.3-pr-490.1

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-490.2

Install it with:

npm install svelteplot@pr-490
# or install the specific version
npm install svelteplot@0.10.3-pr-490.2

@gka gka self-assigned this Feb 23, 2026
@gka gka merged commit ff0211a into main Feb 23, 2026
9 checks passed
@gka gka deleted the types/fix-remaining-mark-issues branch February 23, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment