amis-rpc-design/node_modules/@ant-design/cssinjs/lib/hooks/useCompatibleInsertionEffect.d.ts
2023-10-07 19:42:30 +08:00

11 lines
508 B
TypeScript

import type { EffectCallback } from 'react';
import * as React from 'react';
type UseCompatibleInsertionEffect = (renderEffect: EffectCallback, effect: (polyfill?: boolean) => ReturnType<EffectCallback>, deps?: React.DependencyList) => void;
/**
* Compatible `useInsertionEffect`
* will use `useInsertionEffect` if React version >= 18,
* otherwise use `useInsertionEffectPolyfill`.
*/
declare const useCompatibleInsertionEffect: UseCompatibleInsertionEffect;
export default useCompatibleInsertionEffect;