@whatwg-node/server
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -5,3 +5,2 @@ /// <reference types="node" /> | ||
import { NodeRequest } from './utils'; | ||
import { fetch } from '@whatwg-node/fetch'; | ||
export interface CreateServerAdapterOptions<TServerContext, TBaseObject> { | ||
@@ -30,3 +29,7 @@ /** | ||
*/ | ||
fetch: typeof fetch | ((request: Request, ...ctx: any[]) => Promise<Response>); | ||
fetch(request: Request, ...ctx: any[]): Promise<Response>; | ||
fetch(urlStr: string, ...ctx: any[]): Promise<Response>; | ||
fetch(urlStr: string, init: RequestInit, ...ctx: any[]): Promise<Response>; | ||
fetch(url: URL, ...ctx: any[]): Promise<Response>; | ||
fetch(url: URL, init: RequestInit, ...ctx: any[]): Promise<Response>; | ||
/** | ||
@@ -33,0 +36,0 @@ * This function takes Node's request object and returns a WHATWG Fetch spec compliant `Response` object. |
{ | ||
"name": "@whatwg-node/server", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Fetch API compliant HTTP Server adapter", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
32593
549