constants.js — svelte Source File
Architecture documentation for constants.js, a javascript file in the svelte codebase. 0 imports, 7 dependents.
Entity Profile
Dependency Diagram
graph LR 984fb981_b6f6_b4f9_e92f_deca1946ed7f["constants.js"] 48cf26f8_bf34_fd7a_3d52_cc963051e167["context.js"] 48cf26f8_bf34_fd7a_3d52_cc963051e167 --> 984fb981_b6f6_b4f9_e92f_deca1946ed7f a502a1d2_db34_608a_1001_5401b198ec66["error-handling.js"] a502a1d2_db34_608a_1001_5401b198ec66 --> 984fb981_b6f6_b4f9_e92f_deca1946ed7f deb813bb_c5d2_3dfd_2554_606359abaa83["render.js"] deb813bb_c5d2_3dfd_2554_606359abaa83 --> 984fb981_b6f6_b4f9_e92f_deca1946ed7f bde4209f_8ffc_1594_4024_b1835a44bcf6["runtime.js"] bde4209f_8ffc_1594_4024_b1835a44bcf6 --> 984fb981_b6f6_b4f9_e92f_deca1946ed7f 81013f80_b5c2_1ec2_be08_8c26dac8438e["types.d.ts"] 81013f80_b5c2_1ec2_be08_8c26dac8438e --> 984fb981_b6f6_b4f9_e92f_deca1946ed7f 9478150a_17fe_efce_10bd_3938ed8558e2["legacy-client.js"] 9478150a_17fe_efce_10bd_3938ed8558e2 --> 984fb981_b6f6_b4f9_e92f_deca1946ed7f 4469324d_0988_ea58_7534_0c58bd171620["test.ts"] 4469324d_0988_ea58_7534_0c58bd171620 --> 984fb981_b6f6_b4f9_e92f_deca1946ed7f style 984fb981_b6f6_b4f9_e92f_deca1946ed7f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// General flags
export const DERIVED = 1 << 1;
export const EFFECT = 1 << 2;
export const RENDER_EFFECT = 1 << 3;
/**
* An effect that does not destroy its child effects when it reruns.
* Runs as part of render effects, i.e. not eagerly as part of tree traversal or effect flushing.
*/
export const MANAGED_EFFECT = 1 << 24;
/**
* An effect that does not destroy its child effects when it reruns (like MANAGED_EFFECT).
* Runs eagerly as part of tree traversal or effect flushing.
*/
export const BLOCK_EFFECT = 1 << 4;
export const BRANCH_EFFECT = 1 << 5;
export const ROOT_EFFECT = 1 << 6;
export const BOUNDARY_EFFECT = 1 << 7;
/**
* Indicates that a reaction is connected to an effect root — either it is an effect,
* or it is a derived that is depended on by at least one effect. If a derived has
* no dependents, we can disconnect it from the graph, allowing it to either be
* GC'd or reconnected later if an effect comes to depend on it again
*/
export const CONNECTED = 1 << 9;
export const CLEAN = 1 << 10;
export const DIRTY = 1 << 11;
export const MAYBE_DIRTY = 1 << 12;
export const INERT = 1 << 13;
export const DESTROYED = 1 << 14;
// Flags exclusive to effects
/** Set once an effect that should run synchronously has run */
export const EFFECT_RAN = 1 << 15;
/**
* 'Transparent' effects do not create a transition boundary.
* This is on a block effect 99% of the time but may also be on a branch effect if its parent block effect was pruned
*/
export const EFFECT_TRANSPARENT = 1 << 16;
export const EAGER_EFFECT = 1 << 17;
export const HEAD_EFFECT = 1 << 18;
export const EFFECT_PRESERVED = 1 << 19;
export const USER_EFFECT = 1 << 20;
export const EFFECT_OFFSCREEN = 1 << 25;
// Flags exclusive to deriveds
/**
* Tells that we marked this derived and its reactions as visited during the "mark as (maybe) dirty"-phase.
* Will be lifted during execution of the derived and during checking its dirty state (both are necessary
* because a derived might be checked but not executed).
*/
export const WAS_MARKED = 1 << 15;
// Flags used for async
export const REACTION_IS_UPDATING = 1 << 21;
export const ASYNC = 1 << 22;
export const ERROR_VALUE = 1 << 23;
export const STATE_SYMBOL = Symbol('$state');
export const LEGACY_PROPS = Symbol('legacy props');
export const LOADING_ATTR_SYMBOL = Symbol('');
export const PROXY_PATH_SYMBOL = Symbol('proxy path');
/** allow users to ignore aborted signal errors if `reason.name === 'StaleReactionError` */
export const STALE_REACTION = new (class StaleReactionError extends Error {
name = 'StaleReactionError';
message = 'The reaction that called `getAbortSignal()` was re-run or destroyed';
})();
export const ELEMENT_NODE = 1;
export const TEXT_NODE = 3;
export const COMMENT_NODE = 8;
export const DOCUMENT_FRAGMENT_NODE = 11;
Domain
Imported By
- packages/svelte/src/internal/client/context.js
- packages/svelte/src/internal/client/error-handling.js
- packages/svelte/src/legacy/legacy-client.js
- packages/svelte/src/internal/client/render.js
- packages/svelte/src/internal/client/runtime.js
- packages/svelte/tests/signals/test.ts
- packages/svelte/src/internal/client/types.d.ts
Source
Frequently Asked Questions
What does constants.js do?
constants.js is a source file in the svelte codebase, written in javascript. It belongs to the ClientRuntime domain.
What files import constants.js?
constants.js is imported by 7 file(s): context.js, error-handling.js, legacy-client.js, render.js, runtime.js, test.ts, types.d.ts.
Where is constants.js in the architecture?
constants.js is located at packages/svelte/src/internal/client/constants.js (domain: ClientRuntime, 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