Skip to content

Commit

Permalink
Added type definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
c1moore committed Aug 12, 2019
1 parent cc7ca80 commit ec01b29
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 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<boolean>;

export = warmer;

0 comments on commit ec01b29

Please sign in to comment.