Home / File/ warnings.js — svelte Source File

warnings.js — svelte Source File

Architecture documentation for warnings.js, a javascript file in the svelte codebase. 1 imports, 2 dependents.

File javascript SharedInternal BitFlags 1 imports 2 dependents 2 functions

Entity Profile

Dependency Diagram

graph LR
  91a92bf8_dda4_0433_1381_bfdc545a4813["warnings.js"]
  c9866d91_a204_fa55_a9e3_6bcc6aaaec1e["esm-env"]
  91a92bf8_dda4_0433_1381_bfdc545a4813 --> c9866d91_a204_fa55_a9e3_6bcc6aaaec1e
  258b696c_d923_7010_457a_b58908a057b0["clone.js"]
  258b696c_d923_7010_457a_b58908a057b0 --> 91a92bf8_dda4_0433_1381_bfdc545a4813
  ed19e7a9_6c9a_d550_fb57_11945fb409ce["validate.js"]
  ed19e7a9_6c9a_d550_fb57_11945fb409ce --> 91a92bf8_dda4_0433_1381_bfdc545a4813
  style 91a92bf8_dda4_0433_1381_bfdc545a4813 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/* 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\nhttps://svelte.dev/e/dynamic_void_element_content`, bold, normal);
	} else {
		console.warn(`https://svelte.dev/e/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'}\nhttps://svelte.dev/e/state_snapshot_uncloneable`,
			bold,
			normal
		);
	} else {
		console.warn(`https://svelte.dev/e/state_snapshot_uncloneable`);
	}
}

Subdomains

Dependencies

  • esm-env

Frequently Asked Questions

What does warnings.js do?
warnings.js is a source file in the svelte codebase, written in javascript. It belongs to the SharedInternal domain, BitFlags subdomain.
What functions are defined in warnings.js?
warnings.js defines 2 function(s): dynamic_void_element_content, state_snapshot_uncloneable.
What does warnings.js depend on?
warnings.js imports 1 module(s): esm-env.
What files import warnings.js?
warnings.js is imported by 2 file(s): clone.js, validate.js.
Where is warnings.js in the architecture?
warnings.js is located at packages/svelte/src/internal/shared/warnings.js (domain: SharedInternal, subdomain: BitFlags, directory: packages/svelte/src/internal/shared).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free