Blame view

天文台pc/tianwentai-ui/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts 483 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  import * as React from 'react';
  
  type PossibleRef<T> = React.Ref<T> | undefined;
  /**
   * A utility to compose multiple refs together
   * Accepts callback refs and RefObject(s)
   */
  declare function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
  /**
   * A custom hook that composes multiple refs
   * Accepts callback refs and RefObject(s)
   */
  declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
  
  export { composeRefs, useComposedRefs };