import { NodeDefinition, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[root]] node. * See the [[root]] documentation to find out more. */ export interface RootNode extends StatelessGraphNode<'root'> { } /** * A definition of the [[root]] node. * See the [[root]] documentation to find out more. */ export interface RootNodeDefinition extends StatelessNodeDefinition<'root'> { } export declare const ROOT_CONTEXT_NAME: unique symbol; /** * The implementation of the [[root]] node. * See the [[root]] documentation to learn more. */ export declare const RootNodeType: StatelessNodeType<'root'>; /** * Creates a new instance of a [[root]] node, which is used when you want to get the instance of the root graph node. * Resolving this node gets the top-most node of the graph. * * * @example **Get the root node** * ```js * import muster, { computed, root, value } from '@dws/muster'; * * const app = muster(value('World')); * * const greeting = await app.resolve( * computed([root()], (name) => `Hello, ${name}`), * ); * // greeting === 'Hello, World' * ``` * This example shows how to use the [[root]] to get access to the root node of the graph. */ export declare function root(): RootNodeDefinition; export declare function isRootNodeDefinition(value: NodeDefinition): value is RootNodeDefinition;