import { type Accessor, type JSX } from "solid-js"; export type { ResolvedChildren, ResolvedJSXElement } from "solid-js/types/reactive/signal.js"; /** * Type for the `ref` prop */ export type Ref = T | ((el: T) => void) | undefined; /** * Component properties with types for `ref` prop * ```ts * { * ref?: T | ((el: T) => void); * } * ``` */ export interface RefProps { ref?: Ref; } /** * Utility for chaining multiple `ref` assignments with `props.ref` forwarding. * @param refs list of ref setters. Can be a `props.ref` prop for ref forwarding or a setter to a local variable (`el => ref = el`). * @example * ```tsx * interface ButtonProps { * ref?: Ref * } * function Button (props: ButtonProps) { * let ref: HTMLButtonElement | undefined * onMount(() => { * // use the local ref * }) * return