From aa280a76fd079a54ca899fb412ca42ddca94061a Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Mon, 20 Oct 2025 05:15:36 +0000 Subject: [PATCH] Add missing minification options to Transpiler types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/bun-types/bun.d.ts | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index 5215fda802..803ad8ac9d 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -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** *