import Node from "../core/Node.js"; import NodeBuilder from "../core/NodeBuilder.js"; type LoopNodeType = "int" | "uint" | "float"; interface LoopNodeObjectParameter { // TODO Expand to other types and update loop function types appropriately type?: TNodeType; // TODO The variable name should affect the type of the loop function // name?: string; start: Node | number; end: Node | number; condition?: string; update?: Node | number | string; } declare class LoopNode extends Node<"void"> { params: unknown[]; constructor(params?: unknown[]); getProperties(builder: NodeBuilder): unknown; } export default LoopNode; interface Loop { (i: number, func: (inputs: { readonly i: Node<"int"> }) => void): LoopNode; ( i: LoopNodeObjectParameter, func: (inputs: { readonly i: Node }) => void, ): LoopNode; ( i: LoopNodeObjectParameter, j: LoopNodeObjectParameter, func: (inputs: { readonly i: Node; readonly j: Node }) => void, ): LoopNode; } export const Loop: Loop; export const Continue: () => Node; export const Break: () => Node;