custom-formatter
Rich Harris 4 months ago
parent 4a13a38c46
commit 4688cd2a52

@ -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%? * %handler% should be a function. Did you mean to %suggestion%?
* @param {string} handler * @param {string} handler
@ -139,15 +151,3 @@ export function state_proxy_equality_mismatch(operator) {
console.warn("state_proxy_equality_mismatch"); 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");
}
}
Loading…
Cancel
Save