spark.JsonRpcRequest
export interface JsonRpcRequest {
/** JSON-RPC version */
jsonrpc: '2.0';
/** Method name to invoke */
method: string;
/** Optional parameters for the method */
params?: unknown;
/** Optional request ID (required for calls, omitted for notifications) */
id?: string;
}jsonrpc('2.0')- – JSON-RPC version
method(string)- – Method name to invoke
params(unknown)optional- – Optional parameters for the method
id(string)optional- – Optional request ID (required for calls, omitted for notifications)
Core types for Spark.
Spark is the web platform layer for torch.js that provides:
- WebWorker runtime with hot reload support
- Reactive bindings between worker and UI
- File I/O to torchjs.org
- Local IndexedDB persistence
- Dataset loading with torch.json manifests