Skip to content

Commit

Permalink
feat: export Chunk and Module types from @rspack/core (#6421)
Browse files Browse the repository at this point in the history
types: export Chunk and Module from `@rspack/core`
  • Loading branch information
chenjiahan authored May 6, 2024
1 parent f141e1a commit 80d05de
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

2 comments on commit 80d05de

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

task failure

Please sign in to comment.