Formatting

This commit is contained in:
2026-08-03 03:32:11 +00:00
parent 1ba075b5fa
commit a36e267280
6 changed files with 130 additions and 152 deletions
+3
View File
@@ -1,6 +1,7 @@
import type { BaseStream } from '../services/stream/base-stream.js';
export type RouteSendOptions = {
/** Defaults to `response`; any other value sends an application event. */
type?: string;
@@ -15,6 +16,7 @@ export type RouteSendOptions = {
* connection lifetime are shared with other requests on the same connection.
*/
export interface RouteStream {
/** Connection shared by every request on the same transport session. */
readonly connection: BaseStream;
@@ -29,6 +31,7 @@ export type RouteHandler = (stream: RouteStream) => void | Promise<void>;
/** An exact application route with no transport-specific metadata. */
export type RouteDefinition = {
/** Exact route name. Parameter and wildcard syntax are not supported. */
url: string;
handler: RouteHandler;