Home / Function/ throw_rune_error() — svelte Function Reference

throw_rune_error() — svelte Function Reference

Architecture documentation for the throw_rune_error() function in index-client.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  71c58071_e1d0_51ed_7a71_e87bb4889b6c["throw_rune_error()"]
  717fc8d5_bdb4_4b73_d6c5_c4a367a60cf2["index-client.js"]
  71c58071_e1d0_51ed_7a71_e87bb4889b6c -->|defined in| 717fc8d5_bdb4_4b73_d6c5_c4a367a60cf2
  b667f1ee_9b7a_18f9_255c_f0242433f04a["rune_outside_svelte()"]
  71c58071_e1d0_51ed_7a71_e87bb4889b6c -->|calls| b667f1ee_9b7a_18f9_255c_f0242433f04a
  style 71c58071_e1d0_51ed_7a71_e87bb4889b6c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/index-client.js lines 16–36

	function throw_rune_error(rune) {
		if (!(rune in globalThis)) {
			// TODO if people start adjusting the "this can contain runes" config through v-p-s more, adjust this message
			/** @type {any} */
			let value; // let's hope noone modifies this global, but belts and braces
			Object.defineProperty(globalThis, rune, {
				configurable: true,
				// eslint-disable-next-line getter-return
				get: () => {
					if (value !== undefined) {
						return value;
					}

					e.rune_outside_svelte(rune);
				},
				set: (v) => {
					value = v;
				}
			});
		}
	}

Subdomains

Frequently Asked Questions

What does throw_rune_error() do?
throw_rune_error() is a function in the svelte codebase, defined in packages/svelte/src/index-client.js.
Where is throw_rune_error() defined?
throw_rune_error() is defined in packages/svelte/src/index-client.js at line 16.
What does throw_rune_error() call?
throw_rune_error() calls 1 function(s): rune_outside_svelte.

Analyze Your Own Codebase

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

Try Supermodel Free