import { NodeDefinition, NodeLike, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[or]] node. * See the [[or]] documentation to find out more. */ export interface OrNode extends StatelessGraphNode<'or', OrNodeProperties> { } /** * A definition of the [[or]] node. * See the [[or]] documentation to find out more. */ export interface OrNodeDefinition extends StatelessNodeDefinition<'or', OrNodeProperties> { } export interface OrNodeProperties { operands: Array; } /** * The implementation of the [[or]] node. * See the [[or]] documentation to learn more. */ export declare const OrNodeType: StatelessNodeType<'or', OrNodeProperties>; /** * Creates a new instance of a [[or]] node, which introduces an `or` expression. It checks if at least one of its * operands resolves to truthy. The conversion to boolean is done with the `Boolean` JS * function. It requires every operand to resolve to a [[value]]. It throws an error if an * operand resolves to any other node type. * * @example **Different variants of `or` operands** * ```js * import muster, { computed, or, value } from '@dws/muster'; * * const app = muster({}); * await app.resolve(or(true)) // === true * await app.resolve(or(false)) // === false * await app.resolve(or(value(true))) // === true - it is equivalent to or(true) * await app.resolve(or('hello world')) // === true * await app.resolve(or(true, false)) // === true * await app.resolve(or(false, false)) // === false * await app.resolve(or(computed([], () => false))) // === false * await app.resolve(or(computed([], () => true))) // === true * await app.resolve(or(computed([], () => true), true)) // === true * await app.resolve(or(computed([], () => true), false)) // === true * await app.resolve(or(computed([], () => false), false)) // === false * ``` */ export declare function or(...operands: Array): OrNodeDefinition; export declare function isOrNodeDefinition(value: NodeDefinition): value is OrNodeDefinition;