`can't migrate \`${state.str.original.substring(/** @type {number} */(node.start),node.end)}\` to \`$${rune}\` because there's a variable named ${rune}`
);
}
}
// state
if(declarator.init){
let{start,end}=/** @type {{ start: number, end: number }} */(declarator.init);
@ -661,6 +691,8 @@ const instance_script = {
while(state.str.original[end-1]!==')')end+=1;
}
check_rune_binding('state');
state.str.prependLeft(start,'$state(');
state.str.appendRight(end,')');
}else{
@ -755,6 +787,8 @@ const instance_script = {
}
}
check_rune_binding('derived');
// Someone wrote a `$: { ... }` statement which we can turn into a `$derived`
`can't migrate \`$: ${state.str.original.substring(/** @type {number} */(node.body.start),node.body.end)}\` to \`$${rune}\` because there's a variable named ${rune}`
<!-- @migration-task Error while migrating Svelte code: migrating this component would require adding a `$bindable` but there's already a variable named bindable -->
<!-- @migration-task Error while migrating Svelte code: migrating this component would require adding a `$derived` but there's already a variable named derived -->
<!-- @migration-task Error while migrating Svelte code: migrating this component would require adding a `$props` but there's already a variable named props -->