mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
BREAKING(dts): improve types for Deno.serve
(#25369)
This significantly simplifies the types for `Deno.serve`. The following types become generic over the address type: - ServeHandlerInfo - ServeHandler - ServeOptions - ServeInit The following types are removed entirely: - ServeTlsOptions - ServeUnixOptions - ServeUnixHandlerInfo - ServeUnixHandler
This commit is contained in:
parent
1a82b0f808
commit
90338eff8d
2 changed files with 47 additions and 209 deletions
12
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
12
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -10,18 +10,6 @@
|
|||
declare namespace Deno {
|
||||
export {}; // stop default export type behavior
|
||||
|
||||
/** Information for a HTTP request.
|
||||
*
|
||||
* @category HTTP Server
|
||||
* @experimental
|
||||
*/
|
||||
export interface ServeHandlerInfo {
|
||||
/** The remote address of the connection. */
|
||||
remoteAddr: Deno.NetAddr;
|
||||
/** The completion promise */
|
||||
completed: Promise<void>;
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Retrieve the process umask. If `mask` is provided, sets the process umask.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue