All files / src/internal/shared warnings.js

84.61% Statements 33/39
66.66% Branches 4/6
100% Functions 2/2
84.21% Lines 32/38

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 382x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 16x 16x 16x       16x 2x 2x 2x 2x 2x 2x 2x 2x 3x 3x 3x 2x 2x 3x 3x       3x
/* This file is generated by scripts/process-messages/index.js. Do not edit! */
 
import { DEV } from 'esm-env';
 
var bold = 'font-weight: bold';
var normal = 'font-weight: normal';
 
/**
 * `<svelte:element this="%tag%">` is a void element — it cannot have content
 * @param {string} tag
 */
export function dynamic_void_element_content(tag) {
	if (DEV) {
		console.warn(`%c[svelte] dynamic_void_element_content\n%c\`<svelte:element this="${tag}">\` is a void element — it cannot have content`, bold, normal);
	} else {
		// TODO print a link to the documentation
		console.warn("dynamic_void_element_content");
	}
}
 
/**
 * The following properties cannot be cloned with `$state.snapshot` — the return value contains the originals:
 * 
 * %properties%
 * @param {string | undefined | null} [properties]
 */
export function state_snapshot_uncloneable(properties) {
	if (DEV) {
		console.warn(`%c[svelte] state_snapshot_uncloneable\n%c${properties
			? `The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:
 
${properties}`
			: "Value cannot be cloned with `$state.snapshot` — the original value was returned"}`, bold, normal);
	} else {
		// TODO print a link to the documentation
		console.warn("state_snapshot_uncloneable");
	}
}