Skip to content

fix(docs): List props from types imported from other files in component APIs - #119

Merged
techniq merged 1 commit into
nextfrom
techniq/api-imported-props
Nov 26, 2026
Merged

techniq merged 1 commit into
nextfrom
techniq/api-imported-props

Conversation

@techniq

@techniq techniq commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Follow-up to #117. A Props type intersecting a type imported from another file (ex. LinePropsWithoutHTML = { ... } & DataDrivenStyleProps) lost those props: only types in the component's own file were read. They're now resolved with the type checker.

  • Imported types: an intersection member not defined in the file is resolved semantically, keeping props declared in the project (not node_modules / DOM typings).
  • Inherited or own: a prop declared in another component's Props in that component's own file (ex. PathPropsWithoutHTML in Path.shared.svelte.ts) is marked inheritedFrom that component; a shared set (ex. DataDrivenStyleProps in a utils file) stays the component's own.
  • Duplicates: a prop named twice is listed once, its own declaration over an inherited one, with a description / default from whichever has them (ex. a chart's series stays its own; tooltipContext gains its description).

Checked against LayerChart's core components: no prop removed; 22 components gain props (ex. fill / stroke / opacity / class on Line, Rect, Circle, Text; Path's on Area, Spline, Link), and several gain descriptions.

🤖 Generated with Claude Code

…nt APIs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Deploying layerstack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 88d3374
Status:🚫  Build failed.

View logs

@changeset-bot

changeset-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 88d3374

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@layerstack/docs Patch
@layerstack/docs-site Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@layerstack/docs

npm i https://pkg.pr.new/@layerstack/docs@119

@layerstack/svelte-actions

npm i https://pkg.pr.new/@layerstack/svelte-actions@119

@layerstack/svelte-state

npm i https://pkg.pr.new/@layerstack/svelte-state@119

@layerstack/svelte-stores

npm i https://pkg.pr.new/@layerstack/svelte-stores@119

@layerstack/svelte-table

npm i https://pkg.pr.new/@layerstack/svelte-table@119

@layerstack/tailwind

npm i https://pkg.pr.new/@layerstack/tailwind@119

@layerstack/utils

npm i https://pkg.pr.new/@layerstack/utils@119

commit: 88d3374

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
layerstack ✅ Ready (View Log) Visit Preview 88d3374

@techniq
techniq merged commit ea61162 into next Nov 26, 2026
5 of 6 checks passed
@techniq
techniq deleted the techniq/api-imported-props branch November 26, 2026 05:32
@github-actions github-actions Bot mentioned this pull request Nov 26, 2026

This branch was successfully deployed

1 active deployment
Preview — 88d3374a Deployed Nov 26, 2026 by github-actions[bot]
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