mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
feat: Deprecate 'Deno.serveHttp' API (#21874)
`Deno.serveHttp` is now deprecated. Users should migrate to `Deno.serve` API.
This commit is contained in:
parent
0d51c1f90e
commit
a25055356c
1 changed files with 7 additions and 2 deletions
9
cli/tsc/dts/lib.deno.ns.d.ts
vendored
9
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -5286,7 +5286,9 @@ declare namespace Deno {
|
|||
/** The event yielded from an {@linkcode HttpConn} which represents an HTTP
|
||||
* request from a remote client.
|
||||
*
|
||||
* @category HTTP Server */
|
||||
* @category HTTP Server
|
||||
* @deprecated Use {@linkcode serve} instead.
|
||||
*/
|
||||
export interface RequestEvent {
|
||||
/** The request from the client in the form of the web platform
|
||||
* {@linkcode Request}. */
|
||||
|
@ -5305,7 +5307,9 @@ declare namespace Deno {
|
|||
* yields up {@linkcode RequestEvent} events, representing individual
|
||||
* requests on the HTTP server connection.
|
||||
*
|
||||
* @category HTTP Server */
|
||||
* @category HTTP Server
|
||||
* @deprecated Use {@linkcode serve} instead.
|
||||
*/
|
||||
export interface HttpConn extends AsyncIterable<RequestEvent>, Disposable {
|
||||
/** The resource ID associated with this connection. Generally users do not
|
||||
* need to be aware of this identifier. */
|
||||
|
@ -5370,6 +5374,7 @@ declare namespace Deno {
|
|||
* used elsewhere. In such a case, this function will fail.
|
||||
*
|
||||
* @category HTTP Server
|
||||
* @deprecated Use {@linkcode serve} instead.
|
||||
*/
|
||||
export function serveHttp(conn: Conn): HttpConn;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue