Skip to content

Commit

Permalink
fix(bindings/types): Add missing mangle options (#9298)
Browse files Browse the repository at this point in the history
**Description:**

Add missing mangle options to be consistent with the SWC documentation:

https://swc.rs/docs/configuration/minification#jscminifymangle


![image](https://github.com/user-attachments/assets/34b12efd-d1e0-4ab0-a4e2-82419f66d8a6)
  • Loading branch information
chenjiahan committed Jul 20, 2024
1 parent d10cb9f commit 567f40d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packages/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,44 @@ export interface TerserCompressOptions {
export interface TerserMangleOptions {
props?: TerserManglePropertiesOptions;

/**
* Pass `true` to mangle names declared in the top level scope.
*/
topLevel?: boolean

/**
* @deprecated An alias for compatibility with terser.
*/
toplevel?: boolean;

/**
* Pass `true` to not mangle class names.
*/
keepClassNames?: boolean;

/**
* @deprecated An alias for compatibility with terser.
*/
keep_classnames?: boolean;

/**
* Pass `true` to not mangle function names.
*/
keepFnNames?: boolean;

/**
* @deprecated An alias for compatibility with terser.
*/
keep_fnames?: boolean;

/**
* Pass `true` to not mangle private props.
*/
keepPrivateProps?: boolean;

/**
* @deprecated An alias for compatibility with terser.
*/
keep_private_props?: boolean;

ie8?: boolean;
Expand Down

0 comments on commit 567f40d

Please sign in to comment.