diff --git a/bun.lock b/bun.lock index 867b1400..13341445 100644 --- a/bun.lock +++ b/bun.lock @@ -10,7 +10,7 @@ }, "devDependencies": { "@elysiajs/openapi": "^1.4.1", - "@types/bun": "^1.2.12", + "@types/bun": "^1.3.0", "@types/cookie": "^1.0.0", "@types/fast-decode-uri-component": "^1.0.0", "@typescript-eslint/eslint-plugin": "^8.30.1", @@ -246,7 +246,7 @@ "@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], - "@types/bun": ["@types/bun@1.2.23", "", { "dependencies": { "bun-types": "1.2.23" } }, "sha512-le8ueOY5b6VKYf19xT3McVbXqLqmxzPXHsQT/q9JHgikJ2X22wyTW3g3ohz2ZMnp7dod6aduIiq8A14Xyimm0A=="], + "@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.3.0" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], "@types/cookie": ["@types/cookie@1.0.0", "", { "dependencies": { "cookie": "*" } }, "sha512-mGFXbkDQJ6kAXByHS7QAggRXgols0mAdP4MuXgloGY1tXokvzaFFM4SMqWvf7AH0oafI7zlFJwoGWzmhDqTZ9w=="], @@ -304,7 +304,7 @@ "builtin-modules": ["builtin-modules@3.3.0", "", {}, "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw=="], - "bun-types": ["bun-types@1.2.23", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-R9f0hKAZXgFU3mlrA0YpE/fiDvwV0FT9rORApt2aQVWSuJDzZOyB5QLc0N/4HF57CS8IXJ6+L5E4W1bW6NS2Aw=="], + "bun-types": ["bun-types@1.3.0", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-u8X0thhx+yJ0KmkxuEo9HAtdfgCBaM/aI9K90VQcQioAmkVp3SG3FkwWGibUFz3WdXAdcsqOcbU40lK7tbHdkQ=="], "bundle-require": ["bundle-require@5.1.0", "", { "dependencies": { "load-tsconfig": "^0.2.3" }, "peerDependencies": { "esbuild": ">=0.18" } }, "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA=="], diff --git a/package.json b/package.json index 606ef53a..75c6c992 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,7 @@ }, "devDependencies": { "@elysiajs/openapi": "^1.4.1", - "@types/bun": "^1.2.12", + "@types/bun": "^1.3.0", "@types/cookie": "^1.0.0", "@types/fast-decode-uri-component": "^1.0.0", "@typescript-eslint/eslint-plugin": "^8.30.1", diff --git a/src/universal/server.ts b/src/universal/server.ts index a16b9b77..da72aeb7 100644 --- a/src/universal/server.ts +++ b/src/universal/server.ts @@ -1,4 +1,4 @@ -import type { Serve as BunServe, Server as BunServer } from 'bun' +import { Serve as BunServe, type Server as BunServer } from 'bun' import type { IsAny, MaybePromise } from '../types' export interface ErrorLike extends Error { @@ -122,8 +122,8 @@ export interface ServeOptions extends GenericServeOptions { > } -export type Serve = IsAny extends false ? BunServe : ServeOptions -export type Server = IsAny extends false ? BunServer : ServerOptions +export type Serve = IsAny> extends false ? BunServe.Options : ServeOptions +export type Server = IsAny> extends false ? BunServer : ServerOptions export type ServerWebSocketSendStatus = number