UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

7 lines (6 loc) 510 B
/// <reference types="node" /> import { Request, Response } from '@alinea/iso'; import http from 'node:http'; export declare function respondTo(to: http.ServerResponse, response: Response): Promise<void>; export declare function fromNodeRequest(request: http.IncomingMessage): globalThis.Request; export declare function nodeHandler(handler: (request: Request) => Promise<Response | undefined> | Response | undefined): (req: http.IncomingMessage, res: http.ServerResponse, next?: () => void) => Promise<void>;