diff options
Diffstat (limited to 'packages/bun-types/bun.d.ts')
| -rw-r--r-- | packages/bun-types/bun.d.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index 3773d3ebb..1768432df 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -500,7 +500,7 @@ declare module "bun" { * `"system"` uses the same API underneath (except non-blocking). * */ - backend?: "c-ares" | "system" | "getaddrinfo"; + backend?: "libc" | "c-ares" | "system" | "getaddrinfo"; }, ): Promise<DNSLookup[]>; }; @@ -1492,6 +1492,7 @@ declare module "bun" { ) => Response | Promise<Response> | undefined | void | Promise<undefined>; } + export type AnyFunction = (..._: any[]) => any; export interface ServeOptions extends GenericServeOptions { /** * Handle HTTP requests @@ -2819,7 +2820,7 @@ declare module "bun" { reload(options: Pick<Partial<SocketOptions>, "socket">): void; data: Data; } - interface TCPSocketListener<Data> extends SocketListener<Data> { + interface TCPSocketListener<Data = unknown> extends SocketListener<Data> { readonly port: number; readonly hostname: string; } @@ -3170,6 +3171,8 @@ declare module "bun" { /** The base path to use when routing */ assetPrefix?: string; origin?: string; + /** Limit the pages to those with particular file extensions. */ + fileExtensions?: string[]; }); // todo: URL @@ -3365,7 +3368,9 @@ type TypedArray = | Int32Array | Uint32Array | Float32Array - | Float64Array; + | Float64Array + | BigInt64Array + | BigUint64Array; type TimeLike = string | number | Date; type StringOrBuffer = string | TypedArray | ArrayBufferLike; |
