import { NodeDefinition, NodeLike, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[trim]] node. * See the [[trim]] documentation to find out more. */ export interface TrimNode extends StatelessGraphNode<'trim', TrimNodeProperties> { } /** * A definition of the [[trim]] node. * See the [[trim]] documentation to find out more. */ export interface TrimNodeDefinition extends StatelessNodeDefinition<'trim', TrimNodeProperties> { } export interface TrimNodeProperties { subject: NodeDefinition; } /** * The implementation of the [[trim]] node. * See the [[trim]] documentation to learn more. */ export declare const TrimNodeType: StatelessNodeType<'trim', TrimNodeProperties>; /** * Creates a new instance of a [[trim]] node, which is used for trimming white-spaces from the string-based [[value]]s. * The node expects the subject to be a [[value]] containing a string value. It works in a * similar way to the `String.trim` method from JS. * * * @example **Trim a string** * ```js * import muster, { trim } from '@dws/muster'; * * const app = muster({}); * * await app.resolve(trim(' Hello world ')); * // === 'Hello world' * * await app.resolve(trim('Hello world')); * // === 'Hello world' * ``` */ export declare function trim(subject: NodeLike): TrimNodeDefinition; export declare function isTrimNodeDefinition(value: NodeDefinition): value is TrimNodeDefinition;