mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
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>
This commit is contained in:
36
packages/bun-types/bun.d.ts
vendored
36
packages/bun-types/bun.d.ts
vendored
@@ -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**
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user