import type { Readable } from '@vielzeug/ripple'; /** Shape every `ref` prop in this package uses — a JS-only escape hatch to the live element. */ export type RefCallback = ((el: T | null) => void) | null | undefined; /** * Forwards a mounted element to a JS-only `ref` callback prop, and keeps forwarding to a * *new* callback if the prop is set again after mount (e.g. a parent sets it via a ref * callback after render, rather than at initial mount). Every text-entry-style component * with a `ref` escape-hatch prop (`ore-input`, `ore-textarea`, `ore-message-composer`, * `ore-file-input`) wires this identically — call it once from inside `onElement()`, alongside * whatever else that element needs wired. * * @example * ```ts * onElement(fieldRef, (el) => { * const unwireField = tf.wire(el); * const unwireRef = bindRefCallback(props.ref, el); * * return () => { * unwireField(); * unwireRef(); * }; * }); * ``` */ export declare const bindRefCallback: (ref: Readable>, el: T) => (() => void); //# sourceMappingURL=ref-callback.d.ts.map