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
@@ -12,6 +12,3 @@ export const HTTP_STATUS_CODE_CREATED = 201;
* No content response status code.
*/
export const HTTP_STATUS_CODE_NO_CONTENT = 204;
+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;
+1
View File
@@ -5,6 +5,7 @@ import type { BaseStream } from './stream/base-stream.ts';
/** Canonical request produced by every transport adapter. */
export type ApplicationRequest = {
/** Exact application route name. */
path: string;
+2
View File
@@ -1,5 +1,6 @@
/** A normal request/response result before transport encoding. */
export type StreamResponse = {
/** Optional correlation ID for multiplexed transports. */
id?: string;
@@ -15,6 +16,7 @@ export type StreamResponse = {
/** An application event before a transport applies its wire encoding. */
export type StreamEvent = {
/** Optional event or correlation ID. */
id?: string;