| 9 | * Minimal interface for file-like objects used by {@link createFileResponse}. |
| 10 | */ |
| 11 | export interface FileLike { |
| 12 | /** File compatibility - included for interface completeness */ |
| 13 | readonly name: string |
| 14 | /** Used for Content-Length header and range calculations */ |
| 15 | readonly size: number |
| 16 | /** Used for Content-Type header */ |
| 17 | readonly type: string |
| 18 | /** Used for Last-Modified header and weak ETag generation */ |
| 19 | readonly lastModified: number |
| 20 | /** Used for streaming the response body */ |
| 21 | stream(): ReadableStream<Uint8Array> |
| 22 | /** Used for strong ETag digest calculation */ |
| 23 | arrayBuffer(): Promise<ArrayBuffer> |
| 24 | /** Used for range requests (206 Partial Content) */ |
| 25 | slice( |
| 26 | start?: number, |
| 27 | end?: number, |
| 28 | contentType?: string, |
| 29 | ): { stream(): ReadableStream<Uint8Array> } |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Custom function for computing file digests. |
no outgoing calls
no test coverage detected
searching dependent graphs…