bun-types 1.0.21 → 1.0.22
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.
- package/package.json +1 -1
- package/types.d.ts +35 -2
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for bun 1.0.
|
|
1
|
+
// Type definitions for bun 1.0.22
|
|
2
2
|
// Project: https://github.com/oven-sh/bun
|
|
3
3
|
// Definitions by: Jarred Sumner <https://github.com/Jarred-Sumner>
|
|
4
4
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
@@ -707,7 +707,7 @@ declare namespace Bun {
|
|
|
707
707
|
* but the values will be available on the global `Bun.argv` as if they
|
|
708
708
|
* were passed as CLI options to the script.
|
|
709
709
|
*/
|
|
710
|
-
|
|
710
|
+
argv?: any[] | undefined;
|
|
711
711
|
|
|
712
712
|
/** If `true` and the first argument is a string, interpret the first argument to the constructor as a script that is executed once the worker is online. */
|
|
713
713
|
// eval?: boolean | undefined;
|
|
@@ -10704,6 +10704,31 @@ declare module "bun:test" {
|
|
|
10704
10704
|
* @param expected the expected value
|
|
10705
10705
|
*/
|
|
10706
10706
|
toContainKey(expected: unknown): void;
|
|
10707
|
+
/**
|
|
10708
|
+
* Asserts that an `object` contains at least one of the provided keys.
|
|
10709
|
+
* Asserts that an `object` contains all the provided keys.
|
|
10710
|
+
*
|
|
10711
|
+
* The value must be an object
|
|
10712
|
+
*
|
|
10713
|
+
* @example
|
|
10714
|
+
* expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['a']);
|
|
10715
|
+
* expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['b']);
|
|
10716
|
+
* expect({ a: 'hello', b: 'world' }).toContainAnyKeys(['b', 'c']);
|
|
10717
|
+
* expect({ a: 'hello', b: 'world' }).not.toContainAnyKeys(['c']);
|
|
10718
|
+
*
|
|
10719
|
+
* @param expected the expected value
|
|
10720
|
+
*/
|
|
10721
|
+
toContainAnyKeys(expected: unknown): void;
|
|
10722
|
+
|
|
10723
|
+
/**
|
|
10724
|
+
* Asserts that an `object` contains all the provided keys.
|
|
10725
|
+
* expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKeys(['a', 'b']);
|
|
10726
|
+
* expect({ a: 'foo', b: 'bar', c: 'baz' }).toContainKeys(['a', 'b', 'c']);
|
|
10727
|
+
* expect({ a: 'foo', b: 'bar', c: 'baz' }).not.toContainKeys(['a', 'b', 'e']);
|
|
10728
|
+
*
|
|
10729
|
+
* @param expected the expected value
|
|
10730
|
+
*/
|
|
10731
|
+
toContainKeys(expected: unknown): void;
|
|
10707
10732
|
/**
|
|
10708
10733
|
* Asserts that a value contains and equals what is expected.
|
|
10709
10734
|
*
|
|
@@ -10934,6 +10959,14 @@ declare module "bun:test" {
|
|
|
10934
10959
|
* expect(new Set()).toBeEmpty();
|
|
10935
10960
|
*/
|
|
10936
10961
|
toBeEmpty(): void;
|
|
10962
|
+
/**
|
|
10963
|
+
* Asserts that a value is an empty `object`.
|
|
10964
|
+
*
|
|
10965
|
+
* @example
|
|
10966
|
+
* expect({}).toBeEmptyObject();
|
|
10967
|
+
* expect({ a: 'hello' }).not.toBeEmptyObject();
|
|
10968
|
+
*/
|
|
10969
|
+
toBeEmptyObject(): void;
|
|
10937
10970
|
/**
|
|
10938
10971
|
* Asserts that a value is `null` or `undefined`.
|
|
10939
10972
|
*
|