import { NodeDefinition, NodeLike, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[charAt]] node. * See the [[charAt]] documentation to find out more. */ export interface CharAtNode extends StatelessGraphNode<'char-at', CharAtNodeProperties> { } /** * A definition of the [[charAt]] node. * See the [[charAt]] documentation to find out more. */ export interface CharAtNodeDefinition extends StatelessNodeDefinition<'char-at', CharAtNodeProperties> { } export interface CharAtNodeProperties { index: NodeDefinition; subject: NodeDefinition; } /** * The implementation of the [[charAt]] node. * See the [[charAt]] documentation to learn more. */ export declare const CharAtNodeType: StatelessNodeType<'char-at', CharAtNodeProperties>; /** * Creates a new instance of a [[charAt]] node, which is used when extracting a specific character from string. The node expects * the subject to be a [[value]] that contains a string value. It work in a similar way as * the `string.charAt(...)` function from JS. * * * @example **Extract char at** * ```js * import muster, { charAt } from '@dws/muster'; * * const app = muster({}); * * await app.resolve(charAt(1, 'Hello world')); * // === 'e' * * await app.resolve(charAt(20, 'Hello world')); * // === null * ``` */ export declare function charAt(index: NodeLike, subject: NodeLike): CharAtNodeDefinition; export declare function isCharAtNodeDefinition(value: NodeDefinition): value is CharAtNodeDefinition;