mirror of https://github.com/sveltejs/svelte
Merge 5193f2c289
into 42e7e8168d
commit
a16db88db1
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: allow `$state` in return statements
|
@ -0,0 +1,14 @@
|
|||||||
|
/* index.svelte.js generated by Svelte VERSION */
|
||||||
|
import * as $ from 'svelte/internal/client';
|
||||||
|
|
||||||
|
export default function proxy(object) {
|
||||||
|
return $.return_proxy(object);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createCounter() {
|
||||||
|
let count = $.state(0);
|
||||||
|
|
||||||
|
$.update(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const proxy_in_arrow = (object) => $.return_proxy(object);
|
@ -0,0 +1,14 @@
|
|||||||
|
/* index.svelte.js generated by Svelte VERSION */
|
||||||
|
import * as $ from 'svelte/internal/server';
|
||||||
|
|
||||||
|
export default function proxy(object) {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createCounter() {
|
||||||
|
let count = 0;
|
||||||
|
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const proxy_in_arrow = (object) => object;
|
@ -0,0 +1,8 @@
|
|||||||
|
export default function proxy(object) {
|
||||||
|
return $state(object);
|
||||||
|
}
|
||||||
|
export function createCounter() {
|
||||||
|
let count = $state(0);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
export const proxy_in_arrow = (object) => $state(object);
|
Loading…
Reference in new issue