Compare commits

...

1 Commits

Author SHA1 Message Date
Claude Bot
aa280a76fd Add missing minification options to Transpiler types
Added missing type definitions for Bun.Transpiler minification options:
- `minify`: boolean | { whitespace?, syntax?, identifiers? }
- `minifySyntax`: boolean
- `minifyIdentifiers`: boolean

Removed `jsxOptimizationInline` which is not implemented in the Zig code.

These options are implemented in src/bun.js/api/JSTranspiler.zig but were missing from the type definitions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 05:15:36 +00:00

View File

@@ -1564,7 +1564,29 @@ declare module "bun" {
};
treeShaking?: boolean;
trimUnusedImports?: boolean;
jsxOptimizationInline?: boolean;
/**
* Enable or configure minification.
* When `true`, enables all minification options.
* When an object, allows granular control.
* @example
* ```js
* // Enable all minification
* { minify: true }
* // Granular control
* { minify: { whitespace: true, syntax: true, identifiers: false } }
* ```
*/
minify?:
| boolean
| {
/** Minify whitespace and comments */
whitespace?: boolean;
/** Minify syntax (e.g., `a === undefined` -> `a === void 0`) */
syntax?: boolean;
/** Minify identifiers (rename variables to shorter names) */
identifiers?: boolean;
};
/**
* **Experimental**
@@ -1572,6 +1594,18 @@ declare module "bun" {
* Minify whitespace and comments from the output.
*/
minifyWhitespace?: boolean;
/**
* **Experimental**
*
* Minify syntax (e.g., `a === undefined` -> `a === void 0`).
*/
minifySyntax?: boolean;
/**
* **Experimental**
*
* Minify identifiers (rename variables to shorter names).
*/
minifyIdentifiers?: boolean;
/**
* **Experimental**
*