pull/11327/head
Rich Harris 2 years ago
parent 82ab2cda34
commit e281ab56a4

@ -199,12 +199,12 @@ export function host_invalid_placement(node) {
}
/**
* Cannot use `export let` in runes mode use $props instead
* Cannot use `export let` in runes mode use `$props()` instead
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function legacy_export_invalid(node) {
e(node, "legacy_export_invalid", "Cannot use `export let` in runes mode — use $props instead");
e(node, "legacy_export_invalid", "Cannot use `export let` in runes mode — use `$props()` instead");
}
/**

@ -6,14 +6,14 @@ var bold = 'font-weight: bold';
var normal = 'font-weight: normal';
/**
* The `%attribute%` attribute on `%html%` changed value between server and client renders. The client value, `%value%`, will be ignored in favour of the server value
* The `%attribute%` attribute on `%html%` changed its value between server and client renders. The client value, `%value%`, will be ignored in favour of the server value
* @param {string} attribute
* @param {string} html
* @param {string} value
*/
export function hydration_attribute_changed(attribute, html, value) {
if (DEV) {
console.warn(`%c[svelte] ${"hydration_attribute_changed"}\n%c${`The \`${attribute}\` attribute on \`${html}\` changed value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value`}`, bold, normal);
console.warn(`%c[svelte] ${"hydration_attribute_changed"}\n%c${`The \`${attribute}\` attribute on \`${html}\` changed its value between server and client renders. The client value, \`${value}\`, will be ignored in favour of the server value`}`, bold, normal);
} else {
// TODO print a link to the documentation
console.warn("hydration_attribute_changed");

@ -3,6 +3,6 @@ import { test } from '../../test';
export default test({
error: {
code: 'legacy_export_invalid',
message: 'Cannot use `export let` in runes mode — use $props instead'
message: 'Cannot use `export let` in runes mode — use `$props()` instead'
}
});

@ -14,6 +14,6 @@ export default test({
},
errors: [
'The `href` attribute on `<a href="/bar">...</a>` changed value between server and client renders. The client value, `/foo`, will be ignored in favour of the server value'
'The `href` attribute on `<a href="/bar">...</a>` changed its value between server and client renders. The client value, `/foo`, will be ignored in favour of the server value'
]
});

Loading…
Cancel
Save