UNPKG

videx-3d

Version:

React 3D component library designed for sub surface visualizations in the browser

16 lines (15 loc) 664 B
import { ReadonlyStore } from '../data/Store'; export type RegistryConfig = { concurrentStoreCalls?: number; }; export type GeneratorFunction = (this: ReadonlyStore, ...args: any[]) => Promise<any>; export declare class GeneratorRegistry { protected store: ReadonlyStore | null; protected config: RegistryConfig; protected generators: Map<string, GeneratorFunction>; constructor(config?: RegistryConfig, store?: ReadonlyStore); add(key: string, generator: GeneratorFunction): void; setStore(store: ReadonlyStore): void; connectRemoteStore(port: MessagePort): Promise<void>; invoke<T>(key: string, ...args: any[]): Promise<T>; }