Files
SnowLuma/.pnpm-store/v11/files/f1/fc219a3f647e367a3702f0ba15409478f7844485aed27c51b0f243be2efb423f5b089ec3c492a35eb00becb3caab0a8b808d0adae55ab84a839358dbe81bce
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

12 lines
376 B
Plaintext

import { ReactRef, RefObject } from './types';
/**
* Transforms one ref to another
* @example
* ```tsx
* const ResizableWithRef = forwardRef((props, ref) =>
* <Resizable {...props} ref={transformRef(ref, i => i ? i.resizable : null)}/>
* );
* ```
*/
export declare function transformRef<T, K>(ref: ReactRef<K>, transformer: (original: T | null) => K): RefObject<T>;