diff --git a/packages/svelte/src/internal/client/warnings.js b/packages/svelte/src/internal/client/warnings.js index 134ef367c8..ddb3ed7296 100644 --- a/packages/svelte/src/internal/client/warnings.js +++ b/packages/svelte/src/internal/client/warnings.js @@ -19,6 +19,18 @@ export function binding_property_non_reactive(binding, location) { } } +/** + * We recommend enabling custom formatters for better results when logging `$state` objects — in your devtools, click the gear icon and check the 'Custom formatters' box + */ +export function enable_custom_formatters() { + if (DEV) { + console.warn(`%c[svelte] enable_custom_formatters\n%cWe recommend enabling custom formatters for better results when logging \`$state\` objects — in your devtools, click the gear icon and check the 'Custom formatters' box`, bold, normal); + } else { + // TODO print a link to the documentation + console.warn("enable_custom_formatters"); + } +} + /** * %handler% should be a function. Did you mean to %suggestion%? * @param {string} handler @@ -138,16 +150,4 @@ export function state_proxy_equality_mismatch(operator) { // TODO print a link to the documentation console.warn("state_proxy_equality_mismatch"); } -} - -/** - * We recommend enabling custom formatters for better results when logging `$state` objects — in your devtools, click the gear icon and check the 'Custom formatters' box - */ -export function enable_custom_formatters() { - if (DEV) { - console.warn(`%c[svelte] enable_custom_formatters\n%cWe recommend enabling custom formatters for better results when logging \`$state\` objects — in your devtools, click the gear icon and check the 'Custom formatters' box`, bold, normal); - } else { - // TODO print a link to the documentation - console.warn("enable_custom_formatters"); - } } \ No newline at end of file