pull/11302/head
Rich Harris 2 years ago
parent f116a61ec7
commit 2f5b26eb6f

@ -176,7 +176,7 @@ function transform(name, dest) {
for (let i = 0; i < parts.length; i += 1) {
const part = parts[i];
if (i % 2 === 0) {
const str = part.replace(/(`|\$)/g, '\\$1');
const str = part.replace(/(`|\${)/g, '\\$1');
quasis.push({
type: 'TemplateElement',
value: { raw: str, cooked: str },

@ -574,7 +574,7 @@ export function avoid_nested_class(node) {
* @param {string} name
*/
export function store_with_rune_name(node, name) {
w(node, "store_with_rune_name", `It looks like you're using the \`\$${name}\` rune, but there is a local binding called \`${name}\`. Referencing a local variable with a \`\$\` prefix will create a store subscription. Please rename \`${name}\` to avoid the ambiguity`);
w(node, "store_with_rune_name", `It looks like you're using the \`$${name}\` rune, but there is a local binding called \`${name}\`. Referencing a local variable with a \`$\` prefix will create a store subscription. Please rename \`${name}\` to avoid the ambiguity`);
}
/**
@ -583,7 +583,7 @@ export function store_with_rune_name(node, name) {
* @param {string} name
*/
export function non_state_reference(node, name) {
w(node, "non_state_reference", `\`${name}\` is updated, but is not declared with \`\$state(...)\`. Changing its value will not correctly trigger updates`);
w(node, "non_state_reference", `\`${name}\` is updated, but is not declared with \`$state(...)\`. Changing its value will not correctly trigger updates`);
}
/**

Loading…
Cancel
Save