types: fix svelte-check issues in src/routes/examples#492
Merged
Conversation
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>
✅ Deploy Preview for svelteplot ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-492
# or install the specific version
npm install svelteplot@0.10.3-pr-492.0 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-492
# or install the specific version
npm install svelteplot@0.10.3-pr-492.1 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-492
# or install the specific version
npm install svelteplot@0.10.3-pr-492.2 |
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 all 110 svelte-check errors across 40 example files with minimal, targeted fixes.
Changes by category
as anycasts — for complex type mismatches: ConstantAccessor variance, data record index signatures, GeoJSON property access, spread results from transforms (normalizeY,mapX,stackMosaicX)as number,String()for arithmetic onRawValueand implicit symbol-to-string conversions"OrRd"→"orrd","PiYG"→"piyg","BuRd"→"burd"(d: any)annotations for implicit-any callback parameters in filter/sort/map callbacks{...(expr as any)}instead of{...expr as any}for Svelte template parser compatibilitylang="ts"additions — added to script blocks that use TypeScript syntaxas anycasts from template string literals to script variables (Svelte template parser limitation)cumulative: true→cumulative: 1,tickFormatreturn typenumber→string🤖 Generated with Claude Code