import { NodeDefinition, NodeLike, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[endsWith]] node. * See the [[endsWith]] documentation to find out more. */ export interface EndsWithNode extends StatelessGraphNode<'ends-with', EndsWithNodeProperties> { } /** * A definition of the [[endsWith]] node. * See the [[endsWith]] documentation to find out more. */ export interface EndsWithNodeDefinition extends StatelessNodeDefinition<'ends-with', EndsWithNodeProperties> { } export interface EndsWithNodeProperties { pattern: NodeDefinition; subject: NodeDefinition; } /** * The implementation of the [[endsWith]] node. * See the [[endsWith]] documentation to learn more. */ export declare const EndsWithNodeType: StatelessNodeType<'ends-with', EndsWithNodeProperties>; /** * Creates a new instance of a [[endsWith]] node, which is used when checking if a [[value]] containing a string ends with * a given pattern. The node expects the subject to be a [[value]] that contains a string value. * * * @example **Check if string ends with a pattern** * ```js * import muster, { endsWith } from '@dws/muster'; * * const app = muster({}); * * await app.resolve(endsWith('Hello world', 'rld')); * // === true * * await app.resolve(endsWith('Hello world', 'abc')); * // === false * ``` */ export declare function endsWith(pattern: NodeLike, subject: NodeLike): EndsWithNodeDefinition; export declare function isEndsWithNodeDefinition(value: NodeDefinition): value is EndsWithNodeDefinition;