docs: clarify $bindable fallback binding requirement#18477
Open
barry166 wants to merge 1 commit into
Open
Conversation
The `$bindable` rune page already shows fallback values but did not repeat the runes-mode constraint documented in the Svelte 5 migration guide. This adds the missing note directly where users learn `$bindable`, so readers do not need to discover the non-undefined binding requirement elsewhere. Constraint: Keep the change documentation-only and aligned with the existing migration guide language Rejected: Add runtime linting behavior | issue only asks for docs and lint design would need maintainer discussion Confidence: high Scope-risk: narrow Directive: Do not expand this PR into runtime validation without maintainer direction Tested: corepack pnpm lint Tested: corepack pnpm test Not-tested: corepack pnpm check blocked by local pnpm 11 lifecycle build-approval issue during nested install
|
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.
Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.packages/svelte/src, add a changeset (npx changeset). N/A, docs-only.Tests and linting
pnpm testand lint the project withpnpm lintSummary
Closes #18417.
Adds the
$bindablepage note that the Svelte 5 migration guide already documents: when a bindable prop has a fallback value, a parent usingbind:must pass a value other thanundefined.This keeps the docs local to where users first read about
$bindable('fallback').AI assistance
This PR was AI-assisted. I manually reviewed the final diff before submission.
Test plan
corepack pnpm lintcorepack pnpm testNote: I also tried
corepack pnpm check, but it is blocked in this local environment by a nested install invoking a pnpm 11 lifecycle/build-approval path. The docs-only change is covered by lint and the full test suite above.