import type { MixedOutput, Module, ReadOnlyGraph } from '@expo/metro/metro/DeltaBundler/types'; /** * Some bitsets represent entries; others represent groups of modules called atoms. * Entry bits record which entries need a module through synchronous dependencies. * Modules needed by the same entries form a raw atom. Atom bits record which groups * an entry needs or is guaranteed to have registered before it loads. * * An entry can stop owning an atom when its modules are guaranteed to be registered * before that entry loads. The planner checks this for every path to the entry. */ export type BitSet = bigint; type GraphModule = Module; export declare function bitIndices(bits: BitSet): IterableIterator; export interface PlannerEntryPoint { readonly module: GraphModule; readonly kind: 'initial' | 'dynamic'; } export interface BitSetGraphAnalysis { readonly entryPoints: readonly PlannerEntryPoint[]; readonly dependentEntriesByModule: ReadonlyMap; readonly dynamicImportsByEntry: readonly BitSet[]; readonly workerEntries: readonly GraphModule[]; } /** Modules with the same entrypoint owners. */ export interface ChunkAtom { /** * Raw atoms start with all dependent entries as owners. An owner is removed only when * these modules are guaranteed to be registered before that entry loads on every import path. */ readonly ownerEntries: BitSet; readonly modules: ReadonlySet; } export interface BitSetChunkPlan extends BitSetGraphAnalysis { readonly rawAtoms: readonly ChunkAtom[]; /** Bits refer to rawAtoms, not entrypoints. */ readonly syncDependencyAtomsByEntry: readonly BitSet[]; readonly guaranteedLoadedAtomsByEntry: readonly BitSet[]; readonly chunks: readonly ChunkAtom[]; /** All chunks needed by each entry, including ones already loaded. */ readonly requiredChunksByEntryPath: ReadonlyMap; } export declare function computeBitSetChunkPlan(initialEntries: readonly GraphModule[], graph: ReadOnlyGraph, options: { isLazyBundle: boolean; }): BitSetChunkPlan; /** Analyze a complete application graph, excluding worker dependencies. */ export declare function analyzeBitSetGraph(initialEntries: readonly GraphModule[], graph: ReadOnlyGraph, options: { isLazyBundle: boolean; }): BitSetGraphAnalysis; export {};