import { Component } from '../component'; import { CHILDREN, DEFERRED_REF, PROPS, TYPE } from './symbols'; /** * PuptNode represents any valid child of a JSX element. * Can be primitives, elements, or arrays of nodes. */ export type PuptNode = string | number | boolean | null | undefined | PuptElement | PuptNode[]; /** * PuptElement represents a JSX element in the pupt-lib tree. * Uses symbols for internal properties to prevent collision with property access. */ export interface PuptElement
> { [TYPE]: string | symbol | ComponentType
; [PROPS]: P; [CHILDREN]: PuptNode[]; } /** * DeferredRef represents a reference to a property on a resolved element value. * This is used when accessing properties like `{github.stars}` on elements. */ export interface DeferredRef { [DEFERRED_REF]: true; element: PuptElement; path: (string | number)[]; } /** * ComponentType can be either a class component (extending Component) * or a function component. */ export type ComponentType
> = (new () => Component
) | ((props: P & { children?: PuptNode; }) => PuptNode); /** * Type guard to check if a value is a PuptElement. * * @param value - The value to check * @returns true if the value is a PuptElement */ export declare function isPuptElement(value: unknown): value is PuptElement; /** * Type guard to check if a value is a DeferredRef. * * @param value - The value to check * @returns true if the value is a DeferredRef */ export declare function isDeferredRef(value: unknown): value is DeferredRef; //# sourceMappingURL=element.d.ts.map