bun-types-no-globals 1.2.22-canary.20250830T140622 → 1.2.22-canary.20250901T140556

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/lib/bun.d.ts +32 -0
  2. package/package.json +1 -1
package/lib/bun.d.ts CHANGED
@@ -644,6 +644,38 @@ declare module "bun" {
644
644
  * ```
645
645
  */
646
646
  export function parse(input: string): unknown;
647
+
648
+ /**
649
+ * Convert a JavaScript value into a YAML string. Strings are double quoted if they contain keywords, non-printable or
650
+ * escaped characters, or if a YAML parser would parse them as numbers. Anchors and aliases are inferred from objects, allowing cycles.
651
+ *
652
+ * @category Utilities
653
+ *
654
+ * @param input The JavaScript value to stringify.
655
+ * @param replacer Currently not supported.
656
+ * @param space A number for how many spaces each level of indentation gets, or a string used as indentation. The number is clamped between 0 and 10, and the first 10 characters of the string are used.
657
+ * @returns A string containing the YAML document.
658
+ *
659
+ * @example
660
+ * ```ts
661
+ * import { YAML } from "bun";
662
+ *
663
+ * const input = {
664
+ * abc: "def"
665
+ * };
666
+ * console.log(YAML.stringify(input));
667
+ * // # output
668
+ * // abc: def
669
+ *
670
+ * const cycle = {};
671
+ * cycle.obj = cycle;
672
+ * console.log(YAML.stringify(cycle));
673
+ * // # output
674
+ * // &root
675
+ * // obj:
676
+ * // *root
677
+ */
678
+ export function stringify(input: unknown, replacer?: undefined | null, space?: string | number): string;
647
679
  }
648
680
 
649
681
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bun-types-no-globals",
3
- "version": "1.2.22-canary.20250830T140622",
3
+ "version": "1.2.22-canary.20250901T140556",
4
4
  "main": "./generator/index.ts",
5
5
  "types": "./lib/index.d.ts",
6
6
  "description": "TypeScript type definitions for Bun without global types pollution",