UNPKG

astro

Version:

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

19 lines (18 loc) 740 B
export type ModuleId = string; export type ImporterGraph = Map<ModuleId, Set<ModuleId>>; /** * Computes all importer ancestors that should be treated as `in-tree`. * * @example * If `Button.astro` is imported by `PostLayout.astro`, which is imported by * `src/pages/blog.astro`, then seeding with `Button.astro` marks all three. */ export declare function computeInTreeAncestors(input: { seeds: Iterable<ModuleId>; importerGraph: ImporterGraph; stopAt?: (id: ModuleId) => boolean; }): Set<ModuleId>; export declare function buildImporterGraphFromModuleInfo(moduleIds: Iterable<ModuleId>, getModuleInfo: (id: string) => { importers: readonly string[]; dynamicImporters: readonly string[]; } | null): ImporterGraph;