aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-types/bun.d.ts
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-03-22 15:01:01 -0700
committerGravatar GitHub <noreply@github.com> 2023-03-22 15:01:01 -0700
commita5f92224b586289fc72f0abdb68b08eef9f017db (patch)
tree6092397858776820b431b0dffa635d8bc3b3185e /packages/bun-types/bun.d.ts
parent2bdaa81b1c2325687c5115b4e97627533cb3646b (diff)
downloadbun-a5f92224b586289fc72f0abdb68b08eef9f017db.tar.gz
bun-a5f92224b586289fc72f0abdb68b08eef9f017db.tar.zst
bun-a5f92224b586289fc72f0abdb68b08eef9f017db.zip
Fix types (#2453)
* WIP * WIP * WIP * WIP * Improve typechecking in type files * Fix typechecking * Update * Update submodule * CI for typechecking * Add ci * Update commands * Format after build * Dont use bunx * Rename job * Use nodemodules prettier * Update workflow * Use symlink * Debug * Debug * Clean up and rename jobs
Diffstat (limited to 'packages/bun-types/bun.d.ts')
-rw-r--r--packages/bun-types/bun.d.ts11
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;