import * as t from '@babel/types'; import type { NodePath } from '@babel/traverse'; import { ResolutionNode } from '../multiplication/types'; export type Part = { type: 'static'; value: string; } | { type: 'derive'; node: t.Expression; } | { type: 'dynamic'; node: t.Expression; }; export declare const INVALID_TEMPLATE_ESCAPE_ERROR = "Template literal contains an invalid escape sequence"; export type FlattenExpressionError = { kind: 'invalid-template-escape' | 'invalid-expression'; message: string; }; type FlattenExpressionResult = { parts: ResolutionNode[]; errors: FlattenExpressionError[]; }; /** * Recursively decomposes an expression tree into a flat list of typed parts. * Handles string/numeric/boolean/null literals, void expressions, * template literals, and binary '+' concatenation. When a NodePath is * provided, imported derive() calls are preserved as derive parts. * * Returns errors alongside parts so callers can report extraction failures * without throwing during expression flattening. Adjacent static parts are * coalesced before returning. */ export declare function flattenExpressionToParts(exprPath: NodePath): FlattenExpressionResult; export {}; //# sourceMappingURL=flattenExpressionToParts.d.ts.map