Skip to content

Commit d401d8c

Browse files
authored
fix: update all $state.frozen autocomplete sugestions to $state.raw (#889)
1 parent a9367a4 commit d401d8c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/svelte.dev/content/tutorial/01-svelte/03-props/03-spread-props/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ We _could_ fix it by adding the prop...
3838
> ...in which case you can access the properties by their object paths:
3939
>
4040
> ```js
41-
> console.log(stuff.name, stuff.version, stuff.description, stuff.website)
41+
> console.log(stuff.name, stuff.version, stuff.description, stuff.website);
4242
> ```

packages/site-kit/src/lib/codemirror/autocompletionDataProvider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ const is_state = (node) => {
493493

494494
/**
495495
* Returns `true` if we're already in a valid call expression, e.g.
496-
* changing an existing `$state()` to `$state.frozen()`
496+
* changing an existing `$state()` to `$state.raw()`
497497
* @type {import("./types").Test}
498498
*/
499499
const is_state_call = (node) => {
@@ -583,8 +583,8 @@ export const runes = [
583583
{ snippet: '$derived.by', test: is_state_call },
584584
{ snippet: '$effect(() => {\n\t${}\n});', test: is_statement },
585585
{ snippet: '$effect.pre(() => {\n\t${}\n});', test: is_statement },
586-
{ snippet: '$state.frozen(${});', test: is_state },
587-
{ snippet: '$state.frozen', test: is_state_call },
586+
{ snippet: '$state.raw(${});', test: is_state },
587+
{ snippet: '$state.raw', test: is_state_call },
588588
{ snippet: '$bindable()', test: is_bindable },
589589
{ snippet: '$effect.root(() => {\n\t${}\n})' },
590590
{ snippet: '$state.snapshot(${})' },

0 commit comments

Comments
 (0)