Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
26
node_modules/edge-runtime/dist/server/create-handler.d.ts
generated
vendored
Normal file
26
node_modules/edge-runtime/dist/server/create-handler.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/// <reference types="node" />
|
||||
import type { EdgeRuntime } from '../edge-runtime';
|
||||
import type { IncomingMessage, ServerResponse } from 'http';
|
||||
import type { Logger } from '../types';
|
||||
import type { EdgeContext } from '@edge-runtime/vm';
|
||||
export interface Options<T extends EdgeContext> {
|
||||
/**
|
||||
* A logger interface. If none is provided there will be no logs.
|
||||
*/
|
||||
logger?: Logger;
|
||||
/**
|
||||
* The runtime where the FetchEvent will be triggered whenever the server
|
||||
* receives a request.
|
||||
*/
|
||||
runtime: EdgeRuntime<T>;
|
||||
}
|
||||
/**
|
||||
* Creates an HHTP handler that can be used to create a Node.js HTTP server.
|
||||
* Whenever a request is handled it will transform it into a `dispatchFetch`
|
||||
* call for the given `EdgeRuntime`. Then it will transform the response
|
||||
* into an HTTP response.
|
||||
*/
|
||||
export declare function createHandler<T extends EdgeContext>(options: Options<T>): {
|
||||
handler: (req: IncomingMessage, res: ServerResponse) => Promise<void>;
|
||||
waitUntil: () => Promise<unknown[]>;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue