mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[react-native] Add declarations for MessageQueue and BatchedBridge.
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
interface SpyData {
|
||||
type: number;
|
||||
module?: string;
|
||||
method: string | number;
|
||||
args: any[];
|
||||
}
|
||||
|
||||
declare class MessageQueue {
|
||||
static spy(spyOrToggle: boolean | ((data: SpyData) => void)): void;
|
||||
|
||||
getCallableModule(name: string): Object;
|
||||
registerCallableModule(name: string, module: Object): void;
|
||||
registerLazyCallableModule(name: string, factory: () => Object): void;
|
||||
}
|
||||
|
||||
declare module "react-native/Libraries/BatchedBridge/BatchedBridge" {
|
||||
const BatchedBridge: MessageQueue;
|
||||
export default BatchedBridge;
|
||||
}
|
||||
|
||||
declare module "react-native/Libraries/BatchedBridge/MessageQueue" {
|
||||
export default MessageQueue;
|
||||
}
|
||||
Vendored
+1
@@ -27,6 +27,7 @@
|
||||
|
||||
/// <reference path="globals.d.ts" />
|
||||
/// <reference path="legacy-properties.d.ts" />
|
||||
/// <reference path="BatchedBridge.d.ts" />
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user