Skip to content

Commit

Permalink
fix: added node http server to handler union (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mordechai Dror committed Sep 27, 2023
1 parent d2f123b commit 3aaa6d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,3 +6,4 @@ yarn.lock
.vscode
.serverless/
dist/
.idea
8 changes: 5 additions & 3 deletions serverless-http.d.ts
@@ -1,3 +1,5 @@
import { Server } from "http";

declare namespace ServerlessHttp {
export interface FrameworkApplication {
callback: Function;
Expand All @@ -11,10 +13,10 @@ declare namespace ServerlessHttp {
}

/**
* Handler-compatible function or application.
* Handler-compatible function, application or plain http server.
*/
export type Application = Function | Partial<FrameworkApplication>;
export type Result = Function | Partial<FrameworkApplication>;
export type Application = Function | Partial<FrameworkApplication> | Server;
export type Result = Function | Partial<FrameworkApplication> | Server;

export type Options = {
provider?: 'aws' | 'azure'
Expand Down

0 comments on commit 3aaa6d0

Please sign in to comment.