/** * Select the earliest commit-phase effect available to a React runtime. * * React 18+ exposes `useInsertionEffect`, which runs before descendant layout * effects and before concurrent work can publish commands. React 17 has no * insertion phase and commits synchronously; callers therefore publish their * ownership ref during render as well as in the layout effect selected here. * * @module react/compat/scope-commit-effect */ import * as React from "react"; type EffectHook = typeof React.useEffect; interface CommitEffectSource { useEffect: EffectHook; useLayoutEffect: EffectHook; useInsertionEffect?: EffectHook; } export interface ScopeCommitStrategy { readonly effect: EffectHook; readonly publishDuringRender: boolean; } /** @internal Select commit ownership behavior for one React runtime. */ export declare function selectScopeCommitStrategy(source: CommitEffectSource, isBrowser: boolean): ScopeCommitStrategy; /** Earliest supported effect for publishing committed lifecycle ownership. */ export declare const useScopeCommitEffect: any; /** Whether this synchronous React runtime needs render-phase publication. */ export declare const scopeCommitRequiresRenderPublication: boolean; export {}; //# sourceMappingURL=scope-commit-effect.d.ts.map