Skip to content

fix: add pending snippet to <svelte:boundary> types #16390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

fel1x-developer
Copy link

@fel1x-developer fel1x-developer commented Jul 16, 2025

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.
  • If this PR changes code within packages/svelte/src, add a changeset (npx changeset).

Tests and linting

  • Run the tests with pnpm test and lint the project with pnpm lint

#16379 doesn't work on the following example

<script lang="ts">
    let name = $state("World");

    await new Promise((resolve) => setTimeout(resolve, 1000));
</script>

<svelte:boundary>
    {#snippet pending()}
        <p>Loading...</p>
    {/snippet}
    {#snippet failed(error)}
        <p>Error: {error}</p>
    {/snippet}
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
<p>Hello {name}!</p>
<button onclick={() => name = "SvelteKit"}>Click me</button>
</svelte:boundary>
Error: Object literal may only specify known properties, and 'pending' does not exist in type '{ onerror?: ((error: unknown, reset: () => void) => void) | undefined; failed?: Snippet<[error: unknown, reset: () => void]> | undefined; }'. (ts)
<svelte:boundary>
    {#snippet pending()}
        <p>Loading...</p>

Copy link

changeset-bot bot commented Jul 16, 2025

⚠️ No Changeset found

Latest commit: b892999

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@fel1x-developer
Copy link
Author

I have problem with creating changesets.

pnpx @changesets/cli
🦋  What kind of change is this for svelte? (current version is 5.36.2) · patch
🦋  Please enter a summary for this change (this will be in the changelogs).
🦋    (submit empty line to open external editor)
🦋  Summary · fix: add pending snippet to <svelte:boundary> types
🦋
🦋  === Summary of changesets ===
🦋  patch:  svelte
🦋
🦋  Is this your desired changeset? (Y/n) · true
🦋  error Error: Cannot find module '/Users/minsoochoo/svelte/node_modules/.pnpm/prettier-plugin-svelte@3.4.0_prettier@3.2.4_svelte@packages+svelte/node_modules/svelte/compiler/index.js'
🦋  error     at createEsmNotFoundErr (node:internal/modules/cjs/loader:1437:15)
🦋  error     at finalizeEsmResolution (node:internal/modules/cjs/loader:1426:15)
🦋  error     at resolveExports (node:internal/modules/cjs/loader:657:14)
🦋  error     at Function._findPath (node:internal/modules/cjs/loader:749:31)
🦋  error     at Function._resolveFilename (node:internal/modules/cjs/loader:1387:27)
🦋  error     at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
🦋  error     at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
🦋  error     at Function._load (node:internal/modules/cjs/loader:1211:37)
🦋  error     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
🦋  error     at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) {
🦋  error   code: 'MODULE_NOT_FOUND',
🦋  error   path: '/Users/minsoochoo/svelte/node_modules/.pnpm/prettier-plugin-svelte@3.4.0_prettier@3.2.4_svelte@packages+svelte/node_modules/svelte'
🦋  error }

Copy link
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@16390

@david-plugge
Copy link

I do not understand why the types are not present in the published package. The pr you mentioned was merged and released in 5.36.2 but even when i install that exact version the type is not present.

@Rich-Harris
Copy link
Member

Thanks — I'm 99% sure we should just be inheriting from SvelteHTMLElements and can just delete all this code. Opened #16424

@Rich-Harris
Copy link
Member

merged #16424 — closing

@fel1x-developer fel1x-developer deleted the types branch July 17, 2025 16:32
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.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy