Skip to content

Commit b0a0cce

Browse files
Parameterize ServiceHandler
1 parent 2984250 commit b0a0cce

File tree

1 file changed

+3
-3
lines changed
  • smithy-typescript-ssdk-libs/server-common/src

1 file changed

+3
-3
lines changed

smithy-typescript-ssdk-libs/server-common/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export interface OperationSerializer<T, K extends keyof T, E extends SmithyExcep
3232
serializeError(error: E, ctx: Omit<SerdeContext, 'endpoint'>): Promise<HttpResponse>
3333
}
3434

35-
export interface ServiceHandler {
36-
handle(request: HttpRequest): Promise<HttpResponse>
35+
export interface ServiceHandler<RequestType = HttpRequest, ResponseType = HttpResponse> {
36+
handle(request: RequestType): Promise<ResponseType>
3737
}
3838

3939
export interface ServiceCoordinate<S extends string, O extends String> {
@@ -42,4 +42,4 @@ export interface ServiceCoordinate<S extends string, O extends String> {
4242
}
4343
export interface Mux<S extends string, O extends String> {
4444
match(req: HttpRequest) : ServiceCoordinate<S, O> | undefined;
45-
}
45+
}

0 commit comments

Comments
 (0)