Home / File/ errors.js — svelte Source File

errors.js — svelte Source File

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

File javascript SharedInternal BitFlags 1 imports 1 dependents 8 functions

Entity Profile

Dependency Diagram

graph LR
  5f3f0166_650d_4313_aa8b_50ab02160104["errors.js"]
  c9866d91_a204_fa55_a9e3_6bcc6aaaec1e["esm-env"]
  5f3f0166_650d_4313_aa8b_50ab02160104 --> c9866d91_a204_fa55_a9e3_6bcc6aaaec1e
  ed19e7a9_6c9a_d550_fb57_11945fb409ce["validate.js"]
  ed19e7a9_6c9a_d550_fb57_11945fb409ce --> 5f3f0166_650d_4313_aa8b_50ab02160104
  style 5f3f0166_650d_4313_aa8b_50ab02160104 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';

/**
 * Cannot use `%name%(...)` unless the `experimental.async` compiler option is `true`
 * @param {string} name
 * @returns {never}
 */
export function experimental_async_required(name) {
	if (DEV) {
		const error = new Error(`experimental_async_required\nCannot use \`${name}(...)\` unless the \`experimental.async\` compiler option is \`true\`\nhttps://svelte.dev/e/experimental_async_required`);

		error.name = 'Svelte error';

		throw error;
	} else {
		throw new Error(`https://svelte.dev/e/experimental_async_required`);
	}
}

/**
 * Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead
 * @returns {never}
 */
export function invalid_default_snippet() {
	if (DEV) {
		const error = new Error(`invalid_default_snippet\nCannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead\nhttps://svelte.dev/e/invalid_default_snippet`);

		error.name = 'Svelte error';

		throw error;
	} else {
		throw new Error(`https://svelte.dev/e/invalid_default_snippet`);
	}
}

/**
 * A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`
 * @returns {never}
 */
export function invalid_snippet_arguments() {
	if (DEV) {
		const error = new Error(`invalid_snippet_arguments\nA snippet function was passed invalid arguments. Snippets should only be instantiated via \`{@render ...}\`\nhttps://svelte.dev/e/invalid_snippet_arguments`);

		error.name = 'Svelte error';

		throw error;
	} else {
		throw new Error(`https://svelte.dev/e/invalid_snippet_arguments`);
	}
}

/**
 * `%name%(...)` can only be used during component initialisation
 * @param {string} name
 * @returns {never}
 */
export function lifecycle_outside_component(name) {
	if (DEV) {
// ... (74 more lines)

Subdomains

Dependencies

  • esm-env

Frequently Asked Questions

What does errors.js do?
errors.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 errors.js?
errors.js defines 8 function(s): experimental_async_required, invalid_default_snippet, invalid_snippet_arguments, lifecycle_outside_component, missing_context, snippet_without_render_tag, store_invalid_shape, svelte_element_invalid_this_value.
What does errors.js depend on?
errors.js imports 1 module(s): esm-env.
What files import errors.js?
errors.js is imported by 1 file(s): validate.js.
Where is errors.js in the architecture?
errors.js is located at packages/svelte/src/internal/shared/errors.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