/** * Copyright (c) Nicolas Gallagher. * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ type EventSubscription = { remove: () => void; }; type SimpleTask = { name: string; run: () => void; }; type PromiseTask = { name: string; gen: () => Promise; }; export type Task = SimpleTask | PromiseTask | (() => void); export declare const InteractionManager: { Events: { interactionStart: "interactionStart"; interactionComplete: "interactionComplete"; }; /** * Schedule a function to run after all interactions have completed. */ runAfterInteractions(task?: Task): { then: (onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null) => Promise; done: (onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null) => Promise; cancel: () => void; }; /** * Notify manager that an interaction has started. */ createInteractionHandle(): number; /** * Notify manager that an interaction has completed. */ clearInteractionHandle(handle: number): void; addListener: (eventType: "interactionStart" | "interactionComplete", listener: () => void, context?: any) => EventSubscription; /** * Set deadline for task processing */ setDeadline(deadline: number): void; }; export {}; //# sourceMappingURL=InteractionManager.d.ts.map