/** * @lokascript/framework/testing — Test utilities for domain packages * * Provides assertion helpers and type guards for testing domain DSLs * built on the framework. Import from '@lokascript/framework/testing' * in test files only (requires vitest as a peer dependency). * * @example * ```typescript * import { expectSemanticNode, isLiteralValue } from '@lokascript/framework/testing'; * * test('parses select command', () => { * const node = dsl.parse('select name from users', 'en'); * expectSemanticNode(node, 'select', { columns: 'name', source: 'users' }); * }); * ``` */ import type { SemanticNode, CommandSemanticNode, SemanticValue, LiteralValue, SelectorValue, ExpressionValue, ReferenceValue } from '../core/types'; /** * Assert that a semantic node has the expected action and role values. * Role values can be strings (matched against `value` or `raw`) or full SemanticValue objects. */ export declare function expectSemanticNode(node: SemanticNode, action: string, roles: Record): void; /** * Assert that a value is a literal semantic value with the expected value. */ export declare function expectLiteralValue(value: SemanticValue | undefined, expectedValue: string | number | boolean): void; /** * Assert that a value is a selector semantic value. */ export declare function expectSelectorValue(value: SemanticValue | undefined, expectedSelector: string, expectedKind?: SelectorValue['selectorKind']): void; /** * Assert that a value is an expression semantic value. */ export declare function expectExpressionValue(value: SemanticValue | undefined, expectedRaw: string): void; /** * Assert that a value is a reference semantic value. */ export declare function expectReferenceValue(value: SemanticValue | undefined, expectedRef: string): void; /** Type guard for LiteralValue */ export declare function isLiteralValue(value: SemanticValue): value is LiteralValue; /** Type guard for SelectorValue */ export declare function isSelectorValue(value: SemanticValue): value is SelectorValue; /** Type guard for ExpressionValue */ export declare function isExpressionValue(value: SemanticValue): value is ExpressionValue; /** Type guard for ReferenceValue */ export declare function isReferenceValue(value: SemanticValue): value is ReferenceValue; /** Type guard for CommandSemanticNode */ export declare function isCommandNode(node: SemanticNode): node is CommandSemanticNode; //# sourceMappingURL=index.d.ts.map