types: Fix svelte-check issues in remaining marks#490
Merged
Conversation
✅ 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-490
# or install the specific version
npm install svelteplot@0.10.3-pr-490.0 |
…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>
16f7e84 to
3575e86
Compare
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-490
# or install the specific version
npm install svelteplot@0.10.3-pr-490.1 |
|
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-490
# or install the specific version
npm install svelteplot@0.10.3-pr-490.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 #423
resolves #428
resolves #429
resolves #430
resolves #432
resolves #435
resolves #441
resolves #450
Summary
svelte-checktype errors insrc/lib/marks/: Cell, CustomMarkHTML, DifferenceY, Dot, Geo, HTMLTooltip, Pointer, and Vector@ts-expect-errorwith@ts-ignorefor.svelteimports in test files, resolving a conflict wheresvelte-checkandtscdisagreed on whether the directive was neededKey fixes
typeprop after{...args}spread to preventLinkableMarkProps.typefrom overriding itSnippet<[T]>tuple form; castframeAnchortostringclassNamenull default; castresolveChannelreturns inextent()/max()/min()calls; cast comparisons andfillOpacitygetSymbolPath; castdata as any[]; add missing{plot}prop toDotCanvas; cast options/args in Anchor and event handlerspointRadiuscallback; castdata as any[]; cast args inresolveStyles/addEventHandlers; fixgeometrytype handlingparentElement/firstChildtypes; typedatumstate asDatum | false; addquadtree<Datum>()type paramdata/onupdatedefaults; fixparentElement/firstChildtypes; cast symbol-indexed accesses; typegroups/selectedDatadatadefault; castindexDataresult; use{...(args as any)}spread; castresolveProp/addEventHandlersTest files
Replaces
@ts-expect-errorwith@ts-ignoreon.svelteimports —@ts-expect-errorrequires an error to suppress (fails intscwhich doesn't error), while@ts-ignoresilently suppresses when present but doesn't complain when absent (satisfies bothsvelte-checkandtsc).🤖 Generated with Claude Code