woolball-client
Version:
Client-side library for Woolball enabling secure browser resource sharing for distributed AI task processing
36 lines (35 loc) • 1.09 kB
TypeScript
/**
* Browser compatibility detection module
* Provides utilities to check if the browser is compatible with browser-node
*/
declare global {
interface Window {
chrome?: {
runtime?: {
id?: string;
};
};
}
}
/**
* Error thrown when browser is not compatible with browser-node
*/
export declare class BrowserCompatibilityError extends Error {
constructor(message: string);
}
/**
* Checks if the current environment is a Chrome extension
* @returns {boolean} True if running in a Chrome extension, false otherwise
*/
export declare function isChromeExtension(): boolean;
/**
* Checks if the current browser is Chrome-based
* @returns {boolean} True if browser is Chrome-based, false otherwise
*/
export declare function isChromeBased(): boolean;
/**
* Verifies browser compatibility and throws an error if not compatible
* @throws {BrowserCompatibilityError} If browser is not Chrome-based
*/
export declare function verifyBrowserCompatibility(): void;
export declare function initBrowserCompatibility(): void;