Skip to content

Commit 4d388c3

Browse files
committed
docs(types): sync bundled type stubs to v0.15 API
- Add Deno FileInfo, NetAddr, ServeHandlerInfo, and stat stubs - Add validated, contract, and guard type surfaces - Drop ctx.state, getState, and setState type stubs - Rework response helpers to download and empty - Rework session types around session getter and setter - Switch event types to discriminated EventBase union
1 parent 9af1e7f commit 4d388c3

2 files changed

Lines changed: 956 additions & 1133 deletions

File tree

docs/.vitepress/deserve-deno.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,27 @@ declare namespace Deno {
4343

4444
function upgradeWebSocket(request: Request): { socket: WebSocket; response: Response }
4545

46+
interface FileInfo {
47+
isFile: boolean
48+
isDirectory: boolean
49+
isSymlink: boolean
50+
size: number
51+
mtime: Date | null
52+
atime: Date | null
53+
birthtime: Date | null
54+
}
55+
function stat(path: string | URL): Promise<FileInfo>
56+
57+
interface NetAddr {
58+
transport: 'tcp' | 'udp'
59+
hostname: string
60+
port: number
61+
}
62+
interface ServeHandlerInfo {
63+
remoteAddr: NetAddr
64+
completed: Promise<void>
65+
}
66+
4667
namespace errors {
4768
class NotFound extends Error {}
4869
class InvalidData extends Error {}

0 commit comments

Comments
 (0)