bun-types 1.1.30-canary.20240930T140526 → 1.1.30-canary.20241001T140525

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bun.d.ts +38 -4
  2. package/package.json +1 -1
package/bun.d.ts CHANGED
@@ -1549,13 +1549,35 @@ declare module "bun" {
1549
1549
  kind: ImportKind;
1550
1550
  }
1551
1551
 
1552
- type ModuleFormat = "esm"; // later: "cjs", "iife"
1553
-
1554
1552
  interface BuildConfig {
1555
1553
  entrypoints: string[]; // list of file path
1556
1554
  outdir?: string; // output directory
1557
1555
  target?: Target; // default: "browser"
1558
- format?: ModuleFormat; // later: "cjs", "iife"
1556
+ /**
1557
+ * Output module format. Top-level await is only supported for `"esm"`.
1558
+ *
1559
+ * Can be:
1560
+ * - `"esm"`
1561
+ * - `"cjs"` (**experimental**)
1562
+ * - `"iife"` (**experimental**)
1563
+ *
1564
+ * @default "esm"
1565
+ */
1566
+ format?: /**
1567
+
1568
+ * ECMAScript Module format
1569
+ */
1570
+ | "esm"
1571
+ /**
1572
+ * CommonJS format
1573
+ * **Experimental**
1574
+ */
1575
+ | "cjs"
1576
+ /**
1577
+ * IIFE format
1578
+ * **Experimental**
1579
+ */
1580
+ | "iife";
1559
1581
  naming?:
1560
1582
  | string
1561
1583
  | {
@@ -1613,6 +1635,18 @@ declare module "bun" {
1613
1635
  // /** Only works when runtime=automatic */
1614
1636
  // importSource?: string; // default: "react"
1615
1637
  // };
1638
+
1639
+ /**
1640
+ * Generate bytecode for the output. This can dramatically improve cold
1641
+ * start times, but will make the final output larger and slightly increase
1642
+ * memory usage.
1643
+ *
1644
+ * Bytecode is currently only supported for CommonJS (`format: "cjs"`).
1645
+ *
1646
+ * Must be `target: "bun"`
1647
+ * @default false
1648
+ */
1649
+ bytecode?: boolean;
1616
1650
  }
1617
1651
 
1618
1652
  namespace Password {
@@ -1839,7 +1873,7 @@ declare module "bun" {
1839
1873
  path: string;
1840
1874
  loader: Loader;
1841
1875
  hash: string | null;
1842
- kind: "entry-point" | "chunk" | "asset" | "sourcemap";
1876
+ kind: "entry-point" | "chunk" | "asset" | "sourcemap" | "bytecode";
1843
1877
  sourcemap: BuildArtifact | null;
1844
1878
  }
1845
1879
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.30-canary.20240930T140526",
2
+ "version": "1.1.30-canary.20241001T140525",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "main": "",