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, 17 dependents.

File javascript ClientRuntime Hydration 1 imports 17 dependents 29 functions

Entity Profile

Dependency Diagram

graph LR
  ff387d97_d6d2_81e0_e731_656552709d27["errors.js"]
  c9866d91_a204_fa55_a9e3_6bcc6aaaec1e["esm-env"]
  ff387d97_d6d2_81e0_e731_656552709d27 --> c9866d91_a204_fa55_a9e3_6bcc6aaaec1e
  717fc8d5_bdb4_4b73_d6c5_c4a367a60cf2["index-client.js"]
  717fc8d5_bdb4_4b73_d6c5_c4a367a60cf2 --> ff387d97_d6d2_81e0_e731_656552709d27
  48cf26f8_bf34_fd7a_3d52_cc963051e167["context.js"]
  48cf26f8_bf34_fd7a_3d52_cc963051e167 --> ff387d97_d6d2_81e0_e731_656552709d27
  e70d565a_b58f_b8a3_6358_70d749ddae50["legacy.js"]
  e70d565a_b58f_b8a3_6358_70d749ddae50 --> ff387d97_d6d2_81e0_e731_656552709d27
  2ff2442a_e15d_283b_8fe3_4ea67348835e["validation.js"]
  2ff2442a_e15d_283b_8fe3_4ea67348835e --> ff387d97_d6d2_81e0_e731_656552709d27
  6d3d606a_fb7a_54af_1ece_f1eb12f174d1["boundary.js"]
  6d3d606a_fb7a_54af_1ece_f1eb12f174d1 --> ff387d97_d6d2_81e0_e731_656552709d27
  ca0d28d0_c4b0_db5c_32c9_bdad64d5deaa["each.js"]
  ca0d28d0_c4b0_db5c_32c9_bdad64d5deaa --> ff387d97_d6d2_81e0_e731_656552709d27
  55f8ed50_b15a_01d0_494d_397077cb618a["snippet.js"]
  55f8ed50_b15a_01d0_494d_397077cb618a --> ff387d97_d6d2_81e0_e731_656552709d27
  2254d980_5794_d0a4_3609_60f21d662ff4["input.js"]
  2254d980_5794_d0a4_3609_60f21d662ff4 --> ff387d97_d6d2_81e0_e731_656552709d27
  fd0db0bf_b4fa_ebb0_bf50_f72fe589aea4["hydratable.js"]
  fd0db0bf_b4fa_ebb0_bf50_f72fe589aea4 --> ff387d97_d6d2_81e0_e731_656552709d27
  71020d3b_ab64_9fea_2a06_dab93412f92f["proxy.js"]
  71020d3b_ab64_9fea_2a06_dab93412f92f --> ff387d97_d6d2_81e0_e731_656552709d27
  d8e42d9d_2e3c_635c_19d3_b946a4341c0f["batch.js"]
  d8e42d9d_2e3c_635c_19d3_b946a4341c0f --> ff387d97_d6d2_81e0_e731_656552709d27
  2fb8b3eb_7c25_3930_a184_09fab29d537f["deriveds.js"]
  2fb8b3eb_7c25_3930_a184_09fab29d537f --> ff387d97_d6d2_81e0_e731_656552709d27
  1ae6fa4e_16ee_acdf_5e28_17eb0819fddb["effects.js"]
  1ae6fa4e_16ee_acdf_5e28_17eb0819fddb --> ff387d97_d6d2_81e0_e731_656552709d27
  style ff387d97_d6d2_81e0_e731_656552709d27 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';

export *  from '../shared/errors.js';

/**
 * Cannot create a `$derived(...)` with an `await` expression outside of an effect tree
 * @returns {never}
 */
export function async_derived_orphan() {
	if (DEV) {
		const error = new Error(`async_derived_orphan\nCannot create a \`$derived(...)\` with an \`await\` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan`);

		error.name = 'Svelte error';

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

/**
 * Using `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead
 * @returns {never}
 */
export function bind_invalid_checkbox_value() {
	if (DEV) {
		const error = new Error(`bind_invalid_checkbox_value\nUsing \`bind:value\` together with a checkbox input is not allowed. Use \`bind:checked\` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value`);

		error.name = 'Svelte error';

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

/**
 * Component %component% has an export named `%key%` that a consumer component is trying to access using `bind:%key%`, which is disallowed. Instead, use `bind:this` (e.g. `<%name% bind:this={component} />`) and then access the property on the bound component instance (e.g. `component.%key%`)
 * @param {string} component
 * @param {string} key
 * @param {string} name
 * @returns {never}
 */
export function bind_invalid_export(component, key, name) {
	if (DEV) {
		const error = new Error(`bind_invalid_export\nComponent ${component} has an export named \`${key}\` that a consumer component is trying to access using \`bind:${key}\`, which is disallowed. Instead, use \`bind:this\` (e.g. \`<${name} bind:this={component} />\`) and then access the property on the bound component instance (e.g. \`component.${key}\`)\nhttps://svelte.dev/e/bind_invalid_export`);

		error.name = 'Svelte error';

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

/**
 * A component is attempting to bind to a non-bindable property `%key%` belonging to %component% (i.e. `<%name% bind:%key%={...}>`). To mark a property as bindable: `let { %key% = $bindable() } = $props()`
 * @param {string} key
// ... (431 more lines)

Domain

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 ClientRuntime domain, Hydration subdomain.
What functions are defined in errors.js?
errors.js defines 29 function(s): async_derived_orphan, bind_invalid_checkbox_value, bind_invalid_export, bind_not_bindable, component_api_changed, component_api_invalid_new, derived_references_self, each_key_duplicate, effect_in_teardown, effect_in_unowned_derived, and 19 more.
What does errors.js depend on?
errors.js imports 1 module(s): esm-env.
What files import errors.js?
errors.js is imported by 17 file(s): batch.js, boundary.js, context.js, deriveds.js, each.js, effects.js, hydratable.js, index-client.js, and 9 more.
Where is errors.js in the architecture?
errors.js is located at packages/svelte/src/internal/client/errors.js (domain: ClientRuntime, subdomain: Hydration, directory: packages/svelte/src/internal/client).

Analyze Your Own Codebase

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

Try Supermodel Free