fix: gravity node
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m35s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m35s
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
import { Graph, NodeDefinition, NodeId } from "./types";
|
||||
|
||||
export interface NodeRegistry {
|
||||
|
||||
|
||||
/**
|
||||
* The status of the node registry
|
||||
* @remarks The status should be "loading" when the registry is loading, "ready" when the registry is ready, and "error" if an error occurred while loading the registry
|
||||
@ -25,6 +27,16 @@ export interface NodeRegistry {
|
||||
* @returns An array of all nodes
|
||||
*/
|
||||
getAllNodes: () => NodeDefinition[];
|
||||
|
||||
/**
|
||||
* Register a new node
|
||||
* @param wasmBuffer - The WebAssembly buffer for the node
|
||||
* @returns The node definition
|
||||
*/
|
||||
register: (wasmBuffer: ArrayBuffer) => Promise<NodeDefinition>;
|
||||
|
||||
|
||||
cache?: RuntimeCache<ArrayBuffer>;
|
||||
}
|
||||
|
||||
export interface RuntimeExecutor {
|
||||
@ -49,13 +61,13 @@ export interface RuntimeCache<T = unknown> {
|
||||
* @param key - The key to get the value for
|
||||
* @returns The value for the given key, or undefined if no such value exists
|
||||
*/
|
||||
get: (key: string) => T | undefined;
|
||||
get: (key: string) => T | Promise<T> | undefined;
|
||||
/**
|
||||
* Set the value for the given key
|
||||
* @param key - The key to set the value for
|
||||
* @param value - The value to set
|
||||
*/
|
||||
set: (key: string, value: T) => void;
|
||||
set: (key: string, value: T) => void | Promise<void>;
|
||||
/**
|
||||
* Clear the cache
|
||||
*/
|
||||
|
Reference in New Issue
Block a user