Skip to content

Commit

Permalink
fix: fix types (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
psyrenpark committed Feb 25, 2021
1 parent c68778b commit d0aad6a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions src/configure.d.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
import { RequestListener } from "http"
import { Handler } from "aws-lambda"
import Logger from "./logger"
import { RequestListener } from "http";
import { Handler } from "aws-lambda";
import Logger from "./logger";

interface EventSource {
getRequest?: any; // TODO:
getResponse?: any; // TODO:
}
interface ProxyParams {
app: RequestListener,
binaryMimeTypes?: string[],
binarySettings?: BinarySettings
app: RequestListener;
binaryMimeTypes?: string[];
binarySettings?: BinarySettings;
}

interface BinarySettings {
isBinary?: Function | boolean,
contentTypes?: string[]
isBinary?: Function | boolean;
contentTypes?: string[];
}
interface ConfigureParams {
app: RequestListener,
binaryMimeTypes?: string[],
binarySettings?: BinarySettings
app: RequestListener;
binaryMimeTypes?: string[];
binarySettings?: BinarySettings;
eventSource?: EventSource; // TODO:
}

interface BinarySettings {
isBinary?: Function | boolean,
contentTypes?: string[]
isBinary?: Function | boolean;
contentTypes?: string[];
}

interface ConfigureResult {
handler: Handler,
log: Logger,
proxy: (proxyParams: ProxyParams) => Promise<Object>
handler: Handler;
log: Logger;
proxy: (proxyParams: ProxyParams) => Promise<Object>;
}

declare function configure(configureParams: ConfigureParams): ConfigureResult
declare function configure(configureParams: ConfigureParams): ConfigureResult;

// declare function proxy(proxyParams: ProxyParams): Promise<any>

export default configure
export default configure;
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit d0aad6a

Please sign in to comment.