From ec01b2929fd22efa8c2aeb35be1d5430d332d555 Mon Sep 17 00:00:00 2001 From: Calvin Moore Date: Mon, 12 Aug 2019 16:32:13 -0400 Subject: [PATCH] Added type definitions. --- index.d.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..bbbbc96 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,23 @@ +export type WarmerConfig = { + flag: string, + concurrency: string, + test: string, + log: boolean, + correlationId: string, + delay: number, +}; + +/** + * Returns a Promise that resolves to true if the current invocation is a warming + * invocation and false otherwise. If this is a warming invocation, the Promise will + * wait until the delay specified by `config.delay` has passed. + * + * @param event the event passed to the lambda + * @param [config] the config options to change lambda warmer's default behavior. All of + * the settings are optional + * + * @returns a Promise that resolves to true if this is a warming invocation + */ +function warmer(event: any, config?: WarmerConfig): Promise; + +export = warmer; \ No newline at end of file