Skip to content

Docs | Snapshot: Snapshotstring instead of Snapshot<string> in example  #10683

@mtpython

Description

@mtpython

Describe the bug

On the SvelteKit docs page on Snapshots, when Typescript is selected as a language for docs code samples (toggle inside sidebar), the code references the incorrect type Snapshotstring instead of Snapshot<string>.

I cannot to reference this exact line in docs markdown, because it seems to be generated from JSDoc from this line:

/** @type {import('./$types').Snapshot<string>} */

which, when using Typescript, should get rendered into:

 export const snapshot: Snapshot<string> = {

but is instead rendered as:

 export const snapshot: Snapshotstring = {

Reproduction

  1. Open https://kit.svelte.dev/docs/snapshots
  2. In the Sidebar, switch from "JavaScript" to "TypeScript"
  3. Scroll down to code example titled +page.svelte
  4. See line
export const snapshot: Snapshotstring = {

Logs

No response

System Info

(issue is on SvelteKit website, not in my local development)

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions