Skip to content

Commit

Permalink
types: export Chunk and Module from @rspack/core
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Apr 30, 2024
1 parent ea79a64 commit 8fe32d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/rspack/etc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ type CallFn = (...args: any[]) => any;
type CallFn_2<D> = (args: D[]) => void;

// @public (undocumented)
class Chunk {
export class Chunk {
constructor(chunk: JsChunk, compilation: JsCompilation);
// (undocumented)
static __from_binding(chunk: JsChunk, compilation: Compilation): Chunk;
Expand Down Expand Up @@ -4920,7 +4920,7 @@ export type Mode = z.infer<typeof mode>;
const mode: z.ZodEnum<["development", "production", "none"]>;

// @public (undocumented)
class Module {
export class Module {
constructor(module: JsModule);
// (undocumented)
static __from_binding(module: JsModule): Module;
Expand Down Expand Up @@ -7875,8 +7875,10 @@ declare namespace rspackExports {
StatsModule,
StatsWarnings,
MultiStats,
Chunk,
ChunkGroup,
NormalModuleFactory,
Module,
NormalModule,
ModuleFilenameHelpers,
Template,
Expand Down
3 changes: 3 additions & 0 deletions packages/rspack/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ export type {

export { MultiStats } from "./MultiStats";

export type { Chunk } from "./Chunk";
export type { ChunkGroup } from "./ChunkGroup";

export type { NormalModuleFactory } from "./NormalModuleFactory";

export type { Module } from "./Module";

export { NormalModule } from "./NormalModule";

// API extractor not working with some re-exports, see: https://github.com/microsoft/fluentui/issues/20694
Expand Down

0 comments on commit 8fe32d5

Please sign in to comment.