Skip to content

Docs have some lingering Svelte 4 #14909

@garikAsplund

Description

@garikAsplund

Describe the bug

I'm pretty sure that the code found here is Svelte 4--it'd be better to double check and make sure all code in the docs use Svelte 5 unless there's a reason not to.

If possible it'd be nice to run the migration from 4 -> 5, though that might not be applicable to code blocks in docs 🤷‍♂️

On a related note, is it best to actually have types for TS examples? The updated version in this instance would then read:

  let a: number = $state(0);
  let b: number = $state(0);
  let total: number = $state(0);

Perhaps given the preprocessor that isn't feasible?

Reproduction

Image Image

Logs

System Info

All--docs

Severity

annoyance

Additional Information

Just keeping things tidy and consistent :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions