Skip to content

types: fix svelte-check issues in src/routes/examples#492

Merged
gka merged 3 commits intomainfrom
types/fix-examples
Feb 24, 2026
Merged

types: fix svelte-check issues in src/routes/examples#492
gka merged 3 commits intomainfrom
types/fix-examples

Conversation

@gka
Copy link
Copy Markdown
Contributor

@gka gka commented Feb 23, 2026

Resolves all 110 svelte-check errors across 40 example files with minimal, targeted fixes.

Changes by category

  • as any casts — for complex type mismatches: ConstantAccessor variance, data record index signatures, GeoJSON property access, spread results from transforms (normalizeY, mapX, stackMosaicX)
  • Arithmetic castsas number, String() for arithmetic on RawValue and implicit symbol-to-string conversions
  • Color scheme casing"OrRd""orrd", "PiYG""piyg", "BuRd""burd"
  • Callback param types — explicit (d: any) annotations for implicit-any callback parameters in filter/sort/map callbacks
  • Parenthesized spread casts{...(expr as any)} instead of {...expr as any} for Svelte template parser compatibility
  • lang="ts" additions — added to script blocks that use TypeScript syntax
  • Variable extractions — moved as any casts from template string literals to script variables (Svelte template parser limitation)
  • Logical correctionscumulative: truecumulative: 1, tickFormat return type numberstring

🤖 Generated with Claude Code

110 errors across 40 example files resolved with minimal fixes:
- `as any` casts for complex type mismatches (ConstantAccessor variance,
  data record index signatures, GeoJSON property access)
- `as number`/`as string`/`String()` for arithmetic and implicit conversions
- Color scheme casing corrections (OrRd→orrd, PiYG→piyg, BuRd→burd)
- `(d: any)` annotations for implicit-any callback parameters
- Parenthesized spread casts: `{...(expr as any)}` for Svelte parse compat
- `lang="ts"` added to script blocks using TypeScript syntax
- Variable extractions to avoid `as` casts inside template string literals

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 23, 2026

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 0845c93
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/699e24e42a0a3d00085b3484
😎 Deploy Preview https://deploy-preview-492--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-492.0

Install it with:

npm install svelteplot@pr-492
# or install the specific version
npm install svelteplot@0.10.3-pr-492.0

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-492.1

Install it with:

npm install svelteplot@pr-492
# or install the specific version
npm install svelteplot@0.10.3-pr-492.1

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-492.2

Install it with:

npm install svelteplot@pr-492
# or install the specific version
npm install svelteplot@0.10.3-pr-492.2

@gka gka merged commit dfad213 into main Feb 24, 2026
9 checks passed
@gka gka deleted the types/fix-examples branch February 24, 2026 22:26
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.

1 participant