@rspack/core
Version:
The fast Rust-based web bundler with webpack-compatible API
23 lines (22 loc) • 1.13 kB
TypeScript
import type { JsChunkGraph } from "@rspack/binding";
import type { RuntimeSpec } from "./util/runtime";
import { Chunk } from "./Chunk";
import { ChunkGroup } from "./ChunkGroup";
import { DependenciesBlock } from "./DependenciesBlock";
import { Module } from "./Module";
export declare class ChunkGraph {
#private;
static __from_binding(binding: JsChunkGraph): ChunkGraph;
constructor(binding: JsChunkGraph);
getChunkModules(chunk: Chunk): ReadonlyArray<Module>;
getChunkModulesIterable(chunk: Chunk): Iterable<Module>;
getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>;
getNumberOfEntryModules(chunk: Chunk): number;
getChunkEntryDependentChunksIterable(chunk: Chunk): Iterable<Chunk>;
getChunkModulesIterableBySourceType(chunk: Chunk, sourceType: string): Iterable<Module>;
getModuleChunks(module: Module): Chunk[];
getModuleChunksIterable(module: Module): Iterable<Chunk>;
getModuleId(module: Module): string | null;
getModuleHash(module: Module, runtime: RuntimeSpec): string | null;
getBlockChunkGroup(depBlock: DependenciesBlock): ChunkGroup | null;
}