Skip to content

Commit 3aaa6d0

Browse files
author
Mordechai Dror
authored
fix: added node http server to handler union (dougmoscrop#291)
1 parent d2f123b commit 3aaa6d0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ yarn.lock
66
.vscode
77
.serverless/
88
dist/
9+
.idea

serverless-http.d.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Server } from "http";
2+
13
declare namespace ServerlessHttp {
24
export interface FrameworkApplication {
35
callback: Function;
@@ -11,10 +13,10 @@ declare namespace ServerlessHttp {
1113
}
1214

1315
/**
14-
* Handler-compatible function or application.
16+
* Handler-compatible function, application or plain http server.
1517
*/
16-
export type Application = Function | Partial<FrameworkApplication>;
17-
export type Result = Function | Partial<FrameworkApplication>;
18+
export type Application = Function | Partial<FrameworkApplication> | Server;
19+
export type Result = Function | Partial<FrameworkApplication> | Server;
1820

1921
export type Options = {
2022
provider?: 'aws' | 'azure'

0 commit comments

Comments
 (0)