Skip to content

Commit 93ee6bd

Browse files
committed
fix: type defs
1 parent c62b009 commit 93ee6bd

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/core/types.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,24 @@ export const PORTAL = Symbol("react.portal");
9393

9494
import type { PortalElement } from "../portals/types";
9595

96+
// ******************* //
97+
// VDOM Instance Types //
98+
// ******************* //
99+
100+
export interface VDOMInstance {
101+
element: JSXElementType;
102+
dom: Node | null;
103+
childInstances: VDOMInstance[];
104+
parent?: VDOMInstance;
105+
hooks?: StateOrEffectHook<unknown>[];
106+
hookCursor?: number;
107+
contextValues?: Map<symbol, unknown>; // For context providers
108+
rootContainer?: HTMLElement; // Track root container for root-level instances
109+
}
110+
111+
// Import hook types from hooks module
112+
import type { StateOrEffectHook } from "../hooks/types";
113+
96114
// ******************* //
97115
// Public Hook Types //
98116
// ******************* //

0 commit comments

Comments
 (0)