/** * @callback NetworkCallback * @param {Error | null} err * @param {Network|LegacyNetwork} [network] */ /** * @typedef CreateNetworkOptions * @property {boolean} [subscribeGraph] - Whether the Network should monitor the graph * @property {boolean} [delay] - Whether the Network should be started later */ /** * @typedef { CreateNetworkOptions & import("./BaseNetwork").NetworkOptions} NetworkOptions */ /** * @param {import("fbp-graph").Graph} graphInstance - Graph definition to build a Network for * @param {NetworkOptions} options - Network options * @param {NetworkCallback} [callback] - Legacy callback for the created Network * @returns {Promise} */ export function createNetwork(graphInstance: import("fbp-graph").Graph, options: NetworkOptions, callback?: NetworkCallback): Promise; /** * @param {string} file * @param {NetworkOptions} options - Network options * @param {any} [callback] - Legacy callback * @returning {Promise} */ export function loadFile(file: string, options: NetworkOptions, callback?: any): Promise; /** * @param {graph.Graph} graphInstance * @param {string} file * @param {any} [callback] - Legacy callback * @returning {Promise} */ export function saveFile(graphInstance: graph.Graph, file: string, callback?: any): void; export { isBrowser } from "./Platform.js"; export { ComponentLoader } from "./ComponentLoader.js"; export { Component } from "./Component.js"; export { default as InPort } from "./InPort.js"; export { default as OutPort } from "./OutPort.js"; export { internalSocket }; export { default as IP } from "./IP.js"; export { asComponent } from "./AsComponent.js"; declare const _default: { isBrowser: typeof isBrowser; ComponentLoader: typeof ComponentLoader; Component: typeof Component; InPorts: typeof InPorts; OutPorts: typeof OutPorts; InPort: typeof InPort; OutPort: typeof OutPort; internalSocket: typeof internalSocket; IP: typeof IP; createNetwork: typeof createNetwork; loadFile: typeof loadFile; saveFile: typeof saveFile; asCallback: typeof asCallback; asPromise: typeof asPromise; asComponent: typeof asComponent; Graph: typeof graph.Graph; createGraph: typeof graph.createGraph; loadJSON: typeof graph.loadJSON; loadFBP: typeof graph.loadFBP; equivalent: typeof graph.equivalent; mergeResolveTheirs: typeof graph.mergeResolveTheirs; }; export default _default; export type NetworkCallback = (err: Error | null, network?: Network | LegacyNetwork) => any; export type CreateNetworkOptions = { /** * - Whether the Network should monitor the graph */ subscribeGraph?: boolean; /** * - Whether the Network should be started later */ delay?: boolean; }; export type NetworkOptions = CreateNetworkOptions & import("./BaseNetwork").NetworkOptions; import { Network } from "./Network.js"; import { LegacyNetwork } from "./LegacyNetwork.js"; import { graph } from "fbp-graph"; import * as internalSocket from "./InternalSocket.js"; import { isBrowser } from "./Platform.js"; import { ComponentLoader } from "./ComponentLoader.js"; import { Component } from "./Component.js"; import { InPorts } from "./Ports.js"; import { OutPorts } from "./Ports.js"; import InPort from "./InPort.js"; import OutPort from "./OutPort.js"; import IP from "./IP.js"; import { asCallback } from "./AsCallback.js"; import { asPromise } from "./AsCallback.js"; import { asComponent } from "./AsComponent.js"; export { graph, Graph, journal, Journal } from "fbp-graph"; export { InPorts, OutPorts } from "./Ports.js"; export { asCallback, asPromise } from "./AsCallback.js";