bun-types 1.1.33 → 1.1.34-canary.20241025T140609

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/globals.d.ts +30 -1
  2. package/package.json +1 -1
package/globals.d.ts CHANGED
@@ -1782,7 +1782,36 @@ declare global {
1782
1782
  groupEnd(): void;
1783
1783
  info(...data: any[]): void;
1784
1784
  log(...data: any[]): void;
1785
- /** Does nothing currently */
1785
+ /**
1786
+ * Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just
1787
+ * logging the argument if it can't be parsed as tabular.
1788
+ *
1789
+ * ```js
1790
+ * // These can't be parsed as tabular data
1791
+ * console.table(Symbol());
1792
+ * // Symbol()
1793
+ *
1794
+ * console.table(undefined);
1795
+ * // undefined
1796
+ *
1797
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
1798
+ * // ┌────┬─────┬─────┐
1799
+ * // │ │ a │ b │
1800
+ * // ├────┼─────┼─────┤
1801
+ * // │ 0 │ 1 │ 'Y' │
1802
+ * // │ 1 │ 'Z' │ 2 │
1803
+ * // └────┴─────┴─────┘
1804
+ *
1805
+ * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
1806
+ * // ┌────┬─────┐
1807
+ * // │ │ a │
1808
+ * // ├────┼─────┤
1809
+ * // │ 0 │ 1 │
1810
+ * // │ 1 │ 'Z' │
1811
+ * // └────┴─────┘
1812
+ * ```
1813
+ * @param properties Alternate properties for constructing the table.
1814
+ */
1786
1815
  table(tabularData?: any, properties?: string[]): void;
1787
1816
  /**
1788
1817
  * Begin a timer to log with {@link console.timeEnd}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.33",
2
+ "version": "1.1.34-canary.20241025T140609",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "main": "",