MCPcopy
hub / github.com/livebud/bud / add_variable

Method add_variable

package/svelte/compiler.js:14477–14482  ·  view source on GitHub ↗
(id2, init)

Source from the content-addressed store, hash-verified

14475 this.has_animation = true;
14476 }
14477 add_variable(id2, init) {
14478 if (this.variables.has(id2.name)) {
14479 throw new Error(`Variable '${id2.name}' already initialised with a different value`);
14480 }
14481 this.variables.set(id2.name, { id: id2, init });
14482 }
14483 alias(name) {
14484 if (!this.aliases.has(name)) {
14485 this.aliases.set(name, this.get_unique_name(name));

Callers 15

add_elementMethod · 0.80
get_contentsMethod · 0.80
render_listenersMethod · 0.80
renderMethod · 0.80
add_actionFunction · 0.80
render_keyedMethod · 0.80
get_initMethod · 0.80
bind_thisFunction · 0.80
rename_this_methodMethod · 0.80
render_elementMethod · 0.80
add_bindingsMethod · 0.80

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected