mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
486 B
26 lines
486 B
4 years ago
|
<script>
|
||
|
function test(store) {
|
||
|
// allow declaring $store as parameter
|
||
|
// it's not referring to the store value of the
|
||
|
// `store` variable in the upper scope
|
||
|
return derived(store, $store => {
|
||
|
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function test2(store) {
|
||
|
// allow declaring the `$store` variable
|
||
|
// it is not referring to the store value of the `store` variable
|
||
|
let $store;
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<div
|
||
|
on:test={(store) => {
|
||
|
derived(store, $store => {});
|
||
|
}}
|
||
|
on:test2={(store) => {
|
||
|
let $store;
|
||
|
}}
|
||
|
/>
|