bun-types 0.6.8 → 0.6.9
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 +36 -7
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for bun 0.6.
|
|
1
|
+
// Type definitions for bun 0.6.9
|
|
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
|
|
@@ -27770,6 +27770,38 @@ declare module "bun:test" {
|
|
|
27770
27770
|
|
|
27771
27771
|
export const mock: {
|
|
27772
27772
|
<T extends AnyFunction>(Function: T): Mock<T>;
|
|
27773
|
+
|
|
27774
|
+
mockClear(): typeof mock;
|
|
27775
|
+
mockReset(): typeof mock;
|
|
27776
|
+
mockRestore(): void;
|
|
27777
|
+
mockReturnValue<T extends JestMock.FunctionLike = JestMock.UnknownFunction>(
|
|
27778
|
+
value: ReturnType<T>,
|
|
27779
|
+
): JestMock.MockInstance<T>;
|
|
27780
|
+
mockReturnValueOnce<
|
|
27781
|
+
T extends JestMock.FunctionLike = JestMock.UnknownFunction,
|
|
27782
|
+
>(
|
|
27783
|
+
value: ReturnType<T>,
|
|
27784
|
+
): JestMock.MockInstance<T>;
|
|
27785
|
+
mockResolvedValue<
|
|
27786
|
+
T extends JestMock.FunctionLike = JestMock.UnknownFunction,
|
|
27787
|
+
>(
|
|
27788
|
+
value: JestMock.ResolveType<T>,
|
|
27789
|
+
): JestMock.MockInstance<T>;
|
|
27790
|
+
mockResolvedValueOnce<
|
|
27791
|
+
T extends JestMock.FunctionLike = JestMock.UnknownFunction,
|
|
27792
|
+
>(
|
|
27793
|
+
value: JestMock.ResolveType<T>,
|
|
27794
|
+
): JestMock.MockInstance<T>;
|
|
27795
|
+
mockRejectedValue<
|
|
27796
|
+
T extends JestMock.FunctionLike = JestMock.UnknownFunction,
|
|
27797
|
+
>(
|
|
27798
|
+
value: JestMock.RejectType<T>,
|
|
27799
|
+
): JestMock.MockInstance<T>;
|
|
27800
|
+
mockRejectedValueOnce<
|
|
27801
|
+
T extends JestMock.FunctionLike = JestMock.UnknownFunction,
|
|
27802
|
+
>(
|
|
27803
|
+
value: JestMock.RejectType<T>,
|
|
27804
|
+
): JestMock.MockInstance<T>;
|
|
27773
27805
|
};
|
|
27774
27806
|
|
|
27775
27807
|
interface Jest {
|
|
@@ -28936,7 +28968,7 @@ declare namespace JestMock {
|
|
|
28936
28968
|
ConstructorLikeKeys<T> | MethodLikeKeys<T>
|
|
28937
28969
|
>;
|
|
28938
28970
|
|
|
28939
|
-
type RejectType<T extends FunctionLike> =
|
|
28971
|
+
export type RejectType<T extends FunctionLike> =
|
|
28940
28972
|
ReturnType<T> extends PromiseLike<any> ? unknown : never;
|
|
28941
28973
|
|
|
28942
28974
|
export interface Replaced<T = unknown> {
|
|
@@ -28970,11 +29002,8 @@ declare namespace JestMock {
|
|
|
28970
29002
|
value: V,
|
|
28971
29003
|
) => Replaced<T[K_2]>;
|
|
28972
29004
|
|
|
28973
|
-
type ResolveType<T extends FunctionLike> =
|
|
28974
|
-
infer U
|
|
28975
|
-
>
|
|
28976
|
-
? U
|
|
28977
|
-
: never;
|
|
29005
|
+
export type ResolveType<T extends FunctionLike> =
|
|
29006
|
+
ReturnType<T> extends PromiseLike<infer U> ? U : never;
|
|
28978
29007
|
|
|
28979
29008
|
export type Spied<T extends ClassLike | FunctionLike> = T extends ClassLike
|
|
28980
29009
|
? SpiedClass<T>
|