ComponentContext Type — svelte Architecture
Architecture documentation for the ComponentContext type/interface in types.d.ts from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 8792de33_3e4e_95f0_b2ba_43afe31b8a71["ComponentContext"] 81013f80_b5c2_1ec2_be08_8c26dac8438e["types.d.ts"] 8792de33_3e4e_95f0_b2ba_43afe31b8a71 -->|defined in| 81013f80_b5c2_1ec2_be08_8c26dac8438e style 8792de33_3e4e_95f0_b2ba_43afe31b8a71 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/types.d.ts lines 21–63
export type ComponentContext = {
/** parent */
p: null | ComponentContext;
/** context */
c: null | Map<unknown, unknown>;
/** deferred effects */
e: null | Array<() => void | (() => void)>;
/** True if initialized, i.e. pop() ran */
i: boolean;
/**
* props — needed for legacy mode lifecycle functions, and for `createEventDispatcher`
* @deprecated remove in 6.0
*/
s: Record<string, unknown>;
/**
* exports (and props, if `accessors: true`) — needed for `createEventDispatcher`
* @deprecated remove in 6.0
*/
x: Record<string, any> | null;
/**
* legacy stuff
* @deprecated remove in 6.0
*/
l: null | {
/** local signals (needed for beforeUpdate/afterUpdate) */
s: null | Source[];
/** update_callbacks */
u: null | {
/** afterUpdate callbacks */
a: Array<() => void>;
/** beforeUpdate callbacks */
b: Array<() => void>;
/** onMount callbacks */
m: Array<() => any>;
};
/** `$:` statements */
$: any[];
};
/**
* dev mode only: the component function
*/
function?: any;
};
Source
Frequently Asked Questions
What is the ComponentContext type?
ComponentContext is a type/interface in the svelte codebase, defined in packages/svelte/src/internal/client/types.d.ts.
Where is ComponentContext defined?
ComponentContext is defined in packages/svelte/src/internal/client/types.d.ts at line 21.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free