@techolution-ai/computer-vision
Version:
A JavaScript/TypeScript library for computer vision applications, providing tools for image processing, scanning, and MQTT-based messaging.
22 lines (19 loc) • 878 B
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as React$1 from 'react';
import mqtt, { MqttClient } from 'mqtt';
declare const MessagesContext: React$1.Context<{
log: (...params: any[]) => void;
connect: () => void;
client: MqttClient | null;
registerListener: (topic: string, listener: (topic: string, message: string) => void) => (() => void) | undefined;
removeListener: (topic: string, index: number) => void;
disconnect: () => void;
}>;
interface IMessagesProviderProps {
children?: React.ReactNode;
url: string;
connectionConfig?: mqtt.IClientOptions;
enableDebugging?: boolean;
}
declare function MessagesProvider({ children, url, enableDebugging, connectionConfig, }: IMessagesProviderProps): react_jsx_runtime.JSX.Element;
export { type IMessagesProviderProps, MessagesContext, MessagesProvider as default };