import { Signal, ComputedSignal } from './signals'; type PropType = StringConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor | ObjectConstructor | FunctionConstructor; export interface PropDefinition { type: PropType; required?: boolean; default?: unknown; } export type PropsOptions = Record; export type EmitsOptions = string[]; type InferProps

= { [K in keyof P]: P[K]['required'] extends true ? InferPropType : InferPropType | undefined; }; type InferPropType = T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean : T extends ArrayConstructor ? unknown[] : T extends FunctionConstructor ? (...args: unknown[]) => unknown : unknown; export interface SetupContext { emit: (event: E[number], payload?: unknown) => void; } export interface SetupReturn { state?: Record>; computed?: Record>; actions?: Record unknown>; } export interface ComponentOptions

{ name: string; props?: P; emits?: E; meta?: Record; setup(props: InferProps

, ctx: SetupContext): SetupReturn; } export interface Component { name: string; props: PropsOptions; emits: EmitsOptions; meta: Record; setup: ComponentOptions['setup']; } export declare function defineComponent

(options: ComponentOptions): Component; type LifecycleHook = () => void | Promise; /** * Error hook. Returning `true` suppresses the error from propagating to the * parent component. Anything else (undefined, false) re-throws upward. */ export type ErrorHook = (err: unknown) => boolean | void; export declare function _setSSRMode(v: boolean): void; export declare function _setCurrentHookArrays(mount: LifecycleHook[], unmount: LifecycleHook[], update: LifecycleHook[], error?: ErrorHook[]): void; export declare function onMount(fn: LifecycleHook): void; export declare function onUnmount(fn: LifecycleHook): void; export declare function onUpdate(fn: LifecycleHook): void; /** * Registers an error handler for this component. Catches errors thrown during * setup(), render and child renders. Return `true` to suppress propagation; * otherwise the error bubbles to the parent component. If no handler suppresses * it, the error is logged via console.error and the component renders an empty * placeholder for that render cycle (does NOT crash the rest of the app). * * Example: * onError((err) => { * console.error('UserList failed:', err) * toast.actions.error('No pudimos cargar los usuarios') * return true // don't propagate * }) */ export declare function onError(fn: ErrorHook): void; export {}; //# sourceMappingURL=define-component.d.ts.map