import type { LoggerLike, MetadataAnalysisResult, MetadataPolicyInput, ExtensionDefinition } from "@stripe/formspec-core"; import * as ts from "typescript"; /** * Common options for shared metadata analysis entry points. * * @public */ export interface AnalyzeMetadataOptions { /** Caller-owned TypeScript program used for analysis. */ readonly program: ts.Program; /** Optional built-in metadata policy for apiName/displayName resolution. */ readonly metadata?: MetadataPolicyInput | undefined; /** Optional extension definitions contributing additional metadata slots. */ readonly extensions?: readonly ExtensionDefinition[] | undefined; /** * Optional logger for diagnostic output. Defaults to a no-op logger so * existing callers produce no output. */ readonly logger?: LoggerLike | undefined; } /** * Options for analyzing one declaration node. * * @public */ export interface AnalyzeMetadataForNodeOptions extends AnalyzeMetadataOptions { /** Declaration node to analyze. */ readonly node: ts.Node; } /** * Options for analyzing all supported declarations in one source file. * * @public */ export interface AnalyzeMetadataForSourceFileOptions extends AnalyzeMetadataOptions { /** Source file whose declarations should be analyzed. */ readonly sourceFile: ts.SourceFile; } /** * Internal options for callers that already own a type checker. * * @internal */ export interface AnalyzeMetadataWithCheckerOptions { readonly program?: ts.Program; readonly checker: ts.TypeChecker; readonly node: ts.Node; readonly logicalName?: string; readonly metadata?: MetadataPolicyInput | undefined; readonly extensions?: readonly ExtensionDefinition[] | undefined; readonly buildContext?: unknown; } export declare function analyzeMetadataForNodeWithChecker(options: AnalyzeMetadataWithCheckerOptions): MetadataAnalysisResult | null; /** * Analyze shared metadata semantics for a single declaration node. * * @public */ export declare function analyzeMetadataForNode(options: AnalyzeMetadataForNodeOptions): MetadataAnalysisResult | null; /** * Analyze shared metadata semantics for all supported declarations in a source file. * * @public */ export declare function analyzeMetadataForSourceFile(options: AnalyzeMetadataForSourceFileOptions): readonly MetadataAnalysisResult[]; //# sourceMappingURL=metadata-analysis.d.ts.map