UNPKG

843 BTypeScriptView Raw
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @format
8 */
9
10interface SpyData {
11 type: number;
12 module?: string | undefined;
13 method: string | number;
14 args: any[];
15}
16
17declare class MessageQueue {
18 static spy(spyOrToggle: boolean | ((data: SpyData) => void)): void;
19
20 getCallableModule(name: string): Object;
21 registerCallableModule(name: string, module: Object): void;
22 registerLazyCallableModule(name: string, factory: () => Object): void;
23}
24
25declare module 'react-native/Libraries/BatchedBridge/BatchedBridge' {
26 const BatchedBridge: MessageQueue;
27 export default BatchedBridge;
28}
29
30declare module 'react-native/Libraries/BatchedBridge/MessageQueue' {
31 export default MessageQueue;
32}
33
\No newline at end of file