You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
781 B
TypeScript
28 lines
781 B
TypeScript
/* Lote 0 shims: ampliar tipos para Bun/Fetch sin tocar lógica de runtime */
|
|
declare global {
|
|
// Algunos módulos usan HeadersInit, no siempre presente sin lib DOM
|
|
type HeadersInit = any;
|
|
|
|
// Ensanchar Headers de Bun para que sea asignable donde se espera DOM HeadersInit
|
|
interface Headers {
|
|
toJSON?: any;
|
|
count?: any;
|
|
getAll?: any;
|
|
// En Bun y en el estándar, entries existe siempre; no la marcamos como opcional
|
|
entries(): any;
|
|
}
|
|
|
|
// Añadir timeout soportado por Bun.fetch en algunos usos y permitir httpVersion usado en algunos fetch
|
|
interface BunFetchRequestInit {
|
|
timeout?: number;
|
|
httpVersion?: any;
|
|
}
|
|
|
|
// Evitar 'unknown' en Response.json() en modo estricto
|
|
interface Response {
|
|
json(): Promise<any>;
|
|
}
|
|
}
|
|
|
|
export {};
|