Skip to content

Commit 4471e11

Browse files
committed
fix(types): align doc type shims with source interfaces
- Add Deno.open and FsFile to the Deno shim for file snippets - Add request event OTel metrics fields to EventBase metadata
1 parent 8d55dbc commit 4471e11

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ declare namespace Deno {
1717
path: string | URL,
1818
data: Uint8Array | ReadableStream<Uint8Array>
1919
): Promise<void>
20+
interface FsFile {
21+
write(data: Uint8Array): Promise<number>
22+
close(): void
23+
}
24+
function open(
25+
path: string | URL,
26+
options?: { read?: boolean; write?: boolean; create?: boolean; append?: boolean }
27+
): Promise<FsFile>
2028
function watchFs(
2129
paths: string | string[],
2230
options?: { recursive?: boolean }

docs/.vitepress/deserve-types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,12 @@ export type EventBase =
638638
url: string
639639
durationMs: number
640640
ip?: string
641+
route?: string
642+
serverAddress?: string
643+
serverPort?: number
644+
userAgent?: string
645+
requestSize?: number
646+
responseSize?: number
641647
error?: Error
642648
}
643649
>

0 commit comments

Comments
 (0)