import * as t from '@babel/types'; import { NodePath } from '@babel/traverse'; import { ParsingConfigOptions } from '../../../../../types/parsing.js'; import { StringNode } from '../../types.js'; export type StringTree = (string | StringTree)[]; /** * Extracts content if an expression is derivable (statically analyzable) or uses derive() * Returns a Node representing the parsed expression * @param expr - The expression to check * @param tPath - NodePath for scope resolution * @param file - Current file path * @param parsingOptions - Parsing configuration * @param errors - Errors to add to * @param runtimeInterpolationState - When provided, non-derive dynamic expressions become {n} placeholders instead of errors. Pass { index: 0 } at the entry point for template macros. * @param skipDeriveInvocation - If true, skip derive invocation check * @returns Node | null - The parsed node, or null if invalid * * @note runtimeInterpolationState * - Only provide at entry for template macros, otherwise omit * - t`Hello {nonDerivableValue}` -> t`Hello {0}` * */ export declare function handleDerivation({ expr, tPath, file, parsingOptions, errors, warnings, runtimeInterpolationState, skipDeriveInvocation, }: { expr: t.Expression; tPath: NodePath; file: string; parsingOptions: ParsingConfigOptions; errors: string[]; warnings: Set; runtimeInterpolationState?: { index: number; }; skipDeriveInvocation?: boolean; }): StringNode | null;