UNPKG

histoire

Version:

A fast story book powered by Vite

17 lines • 1.2 kB
import type { ASTNode } from 'magicast'; import type { ConfigPathAnalysis, ParsedConfig } from './types.js'; /** Parses TS/JS once, retaining Babel byte offsets and recast original nodes. */ export declare function parseConfigCode(code: string): ParsedConfig; /** Registers direct declarations in the one supported config factory scope. */ export declare function collectBindings(parsed: ParsedConfig, declaration: Extract<ASTNode, { type: 'VariableDeclaration'; }>): void; /** Records every lexical name in unsupported patterns instead of leaking outer bindings. */ export declare function markComputedBindings(parsed: ParsedConfig, node: ASTNode, kind: string): void; /** Removes syntax-only TypeScript wrappers without following executable code. */ export declare function unwrapNode(node: ASTNode): ASTNode; /** Describes a refusal at the exact expression which caused it. */ export declare function nodeIssue(node: ASTNode, reason: string, status?: ConfigPathAnalysis['status']): ConfigPathAnalysis; /** Converts parser errors to UI-safe analysis without attempting source execution. */ export declare function parseIssue(error: unknown): ConfigPathAnalysis; //# sourceMappingURL=parse.d.ts.map