mirror of
https://github.com/withastro/astro.git
synced 2025-03-24 23:21:57 -05:00
chore: better types (#12944)
This commit is contained in:
parent
bbb1bc9915
commit
35d77b4f7b
1 changed files with 1 additions and 8 deletions
|
@ -2,20 +2,13 @@ import type { IncomingHttpHeaders } from 'node:http';
|
|||
import type { Logger } from './logger/core.js';
|
||||
|
||||
type HeaderType = Headers | Record<string, any> | IncomingHttpHeaders;
|
||||
type RequestBody =
|
||||
| ArrayBuffer
|
||||
| Blob
|
||||
| ReadableStream
|
||||
| URLSearchParams
|
||||
| FormData
|
||||
| ReadableStream<Uint8Array>;
|
||||
|
||||
export interface CreateRequestOptions {
|
||||
url: URL | string;
|
||||
clientAddress?: string | undefined;
|
||||
headers: HeaderType;
|
||||
method?: string;
|
||||
body?: RequestBody | undefined | null;
|
||||
body?: RequestInit['body'];
|
||||
logger: Logger;
|
||||
locals?: object | undefined;
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue