import { NodeDefinition, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[mod]] node. * See the [[mod]] documentation to find out more. */ export interface ModNode extends StatelessGraphNode<'mod', ModNodeProperties> { } /** * A definition of the [[mod]] node. * See the [[mod]] documentation to find out more. */ export interface ModNodeDefinition extends StatelessNodeDefinition<'mod', ModNodeProperties> { } export interface ModNodeProperties { operands: Array; } /** * The implementation of the [[mod]] node. * See the [[mod]] documentation to learn more. */ export declare const ModNodeType: StatelessNodeType<'mod', ModNodeProperties>; /** * Creates a new instance of a [[mod]] node, which is a type of [[NodeDefinition]] used to perform a modulo operation * on number-based [values](_nodes_graph_value_.html#value). * The [[mod]] node takes any number of operands. It will throw an error if the number of * operands is below 2 as it doesn't make sense to do the modulo operation with a single operand. * @returns {ModNodeDefinition} * * * @example **Modulo 5** * ```js * import muster, { mod, ref } from '@dws/muster'; * * const app = muster({ * fourteen: 14, * five: 5, * }); * * const result = await app.resolve( * mod(ref('fourteen'), ref('five')), * ); * // result === 4 * ``` * This example shows how to do the modulo operation with the use of [[mod]]. */ export declare function mod(...operands: Array): ModNodeDefinition; export declare function isModNodeDefinition(value: NodeDefinition): value is ModNodeDefinition;