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