type onStartTransitionFinish = (transition: Transition, mixed: mixed) => void;
type onStartGestureTransitionFinish = (
transition: Transition,
gestureProvider: GestureProvider,
gestureOptions?: GestureOptions,
) => () => void;
export type SharedStateClient = {
H: null | Dispatcher;
A: null | AsyncDispatcher;
T: null | Transition;
S: null | onStartTransitionFinish;
G: null | onStartGestureTransitionFinish;
actQueue: null | Array<RendererTask>;
asyncTransitions: number;
isBatchingLegacy: boolean;
didScheduleLegacyUpdate: boolean;
didUsePromise: boolean;
thrownErrors: Array<mixed>;
getCurrentStack: null | (() => string);
recentlyCreatedOwnerStacks: 0;
};
export type RendererTask = (boolean) => RendererTask | null;
const ReactSharedInternals: SharedStateClient = {
H: null,
A: null,
T: null,
S: null,
} as any;
if (enableGestureTransition) {
ReactSharedInternals.G = null;
}
if (__DEV__) {
ReactSharedInternals.actQueue = null;
ReactSharedInternals.asyncTransitions = 0;
ReactSharedInternals.isBatchingLegacy = false;
ReactSharedInternals.didScheduleLegacyUpdate = false;
ReactSharedInternals.didUsePromise = false;
ReactSharedInternals.thrownErrors = [];
ReactSharedInternals.getCurrentStack = null as null | (() => string);
ReactSharedInternals.recentlyCreatedOwnerStacks = 0;
}
export default ReactSharedInternals;