/** `context` means child handling is known, but Text context varies between branches. */ export type AncestorClassification = 'safe' | 'text' | 'context' | 'unknown'; export type ComponentAncestorClassification = AncestorClassification | 'transparent'; export type AncestorSummary = | ComponentAncestorClassification | { kind: 'import'; source: string; imported: string } | { kind: 'ancestors' | 'branches'; values: AncestorSummary[] }; export type SpreadKeys = string[] | null; export type SpreadSummary = SpreadKeys | { kind: 'import'; source: string; imported: string }; export interface ModuleAncestorAnalysis { exports: Record; exportAll: string[]; spreadExports?: Record; spreadReferences?: Array<{ source: string; imported: string; keys: SpreadKeys }>; /** Import paths after Babel's module resolver, keyed by their pre-compiler spelling. */ sources?: Record; /** The values used by Babel let Metro skip transforms whose ancestor inputs did not change. */ references: Array<{ source: string; imported: string; classification: ComponentAncestorClassification }>; } export interface AncestorSnapshot { version: 1; revision: number; platforms: Record>>>; spreadPlatforms?: Record>>>; }