UNPKG

857 BTypeScriptView Raw
1import type { AnimatedRef } from '../hook/commonTypes';
2import type { Component } from 'react';
3type DispatchCommand = <T extends Component>(animatedRef: AnimatedRef<T>, commandName: string, args?: unknown[]) => void;
4/**
5 * Lets you synchronously call a command of a native component.
6 *
7 * @param animatedRef - An [animated
8 * ref](https://docs.swmansion.com/react-native-reanimated/docs/core/useAnimatedRef#returns)
9 * connected to the component you'd want to call the command on.
10 * @param commandName - The name of the command to dispatch (e.g. `"focus"` or
11 * `"scrollToEnd"`).
12 * @param args - An optional array of arguments for the command.
13 * @see https://docs.swmansion.com/react-native-reanimated/docs/advanced/dispatchCommand
14 */
15export declare let dispatchCommand: DispatchCommand;
16export {};
17//# sourceMappingURL=dispatchCommand.d.ts.map
\No newline at end of file