API

Interface FgNodeSpec

One node in a graph spec. id must be unique within the graph.

interface FgNodeSpec {
    config?: Record<string, unknown>;
    dataDefaults?: Record<string, FgValue>;
    dataSources?: Record<string, { blockId: string; socket: string }>;
    id: string;
    signalTargets?: Record<string, { blockId: string; socket: string }[]>;
    type: string;
}
Index
config?: Record<string, unknown>

Block configuration passed to def.build(config).

dataDefaults?: Record<string, FgValue>

Data INPUT socket name → literal fallback used when the input is unwired.

dataSources?: Record<string, { blockId: string; socket: string }>

Data INPUT socket name → wired source (producer id + output socket).

id: string
signalTargets?: Record<string, { blockId: string; socket: string }[]>

Signal OUTPUT socket name → wired targets (consumer id + input signal).

type: string

FgBlockType value or a "module/Name" custom identifier.