Skip to content

Commit

Permalink
types: make RsbuildPluginAPI readonly (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Apr 4, 2024
1 parent 494298c commit 9ef8882
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shared/src/types/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export type TransformFn = (
/**
* Define a generic Rsbuild plugin API that provider can extend as needed.
*/
export type RsbuildPluginAPI = {
export type RsbuildPluginAPI = Readonly<{
context: Readonly<RsbuildContext>;
isPluginExists: PluginManager['isPluginExists'];

Expand Down Expand Up @@ -263,4 +263,4 @@ export type RsbuildPluginAPI = {
* It will be stable in Rsbuild v0.6.0
*/
transform: TransformFn;
};
}>;

0 comments on commit 9ef8882

Please sign in to comment.