bun-types-no-globals 1.3.4-canary.20251130T140543 → 1.3.4-canary.20251202T140744
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/lib/serve.d.ts +9 -0
- package/lib/test.d.ts +16 -2
- package/package.json +1 -1
package/lib/serve.d.ts
CHANGED
|
@@ -1082,6 +1082,15 @@ declare module "bun" {
|
|
|
1082
1082
|
*/
|
|
1083
1083
|
readonly hostname: string | undefined;
|
|
1084
1084
|
|
|
1085
|
+
/**
|
|
1086
|
+
* The protocol the server is listening on.
|
|
1087
|
+
*
|
|
1088
|
+
* - "http" for normal servers
|
|
1089
|
+
* - "https" when TLS is enabled
|
|
1090
|
+
* - null for unix sockets or when unavailable
|
|
1091
|
+
*/
|
|
1092
|
+
readonly protocol: "http" | "https" | null;
|
|
1093
|
+
|
|
1085
1094
|
/**
|
|
1086
1095
|
* Is the server running in development mode?
|
|
1087
1096
|
*
|
package/lib/test.d.ts
CHANGED
|
@@ -95,8 +95,15 @@ declare module "bun:test" {
|
|
|
95
95
|
function fn<T extends (...args: any[]) => any>(func?: T): Mock<T>;
|
|
96
96
|
function setSystemTime(now?: number | Date): void;
|
|
97
97
|
function setTimeout(milliseconds: number): void;
|
|
98
|
-
function useFakeTimers():
|
|
99
|
-
function useRealTimers():
|
|
98
|
+
function useFakeTimers(options?: { now?: number | Date }): typeof vi;
|
|
99
|
+
function useRealTimers(): typeof vi;
|
|
100
|
+
function advanceTimersByTime(milliseconds: number): typeof vi;
|
|
101
|
+
function advanceTimersToNextTimer(): typeof vi;
|
|
102
|
+
function runAllTimers(): typeof vi;
|
|
103
|
+
function runOnlyPendingTimers(): typeof vi;
|
|
104
|
+
function getTimerCount(): number;
|
|
105
|
+
function clearAllTimers(): void;
|
|
106
|
+
function isFakeTimers(): boolean;
|
|
100
107
|
function spyOn<T extends object, K extends keyof T>(
|
|
101
108
|
obj: T,
|
|
102
109
|
methodOrPropertyValue: K,
|
|
@@ -184,6 +191,13 @@ declare module "bun:test" {
|
|
|
184
191
|
resetAllMocks: typeof jest.resetAllMocks;
|
|
185
192
|
useFakeTimers: typeof jest.useFakeTimers;
|
|
186
193
|
useRealTimers: typeof jest.useRealTimers;
|
|
194
|
+
advanceTimersByTime: typeof jest.advanceTimersByTime;
|
|
195
|
+
advanceTimersToNextTimer: typeof jest.advanceTimersToNextTimer;
|
|
196
|
+
runAllTimers: typeof jest.runAllTimers;
|
|
197
|
+
runOnlyPendingTimers: typeof jest.runOnlyPendingTimers;
|
|
198
|
+
getTimerCount: typeof jest.getTimerCount;
|
|
199
|
+
clearAllTimers: typeof jest.clearAllTimers;
|
|
200
|
+
isFakeTimers: typeof jest.isFakeTimers;
|
|
187
201
|
};
|
|
188
202
|
|
|
189
203
|
interface FunctionLike {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-types-no-globals",
|
|
3
|
-
"version": "1.3.4-canary.
|
|
3
|
+
"version": "1.3.4-canary.20251202T140744",
|
|
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",
|