Skip to content

Commit

Permalink
feat: add jsdocs to lambdaconfig (#19)
Browse files Browse the repository at this point in the history
* feat: add jsdocs to lambdaconfig

* feat: add defaults to types
  • Loading branch information
lukey-aleios committed Jun 26, 2023
1 parent 38573da commit a787bfb
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions constructs/Lambda/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,42 @@ import { allowedConfig } from './config';
export interface RestrictedLambdaConfig {
retryAttempts: typeof allowedConfig.retryAttempts[number];
tracing: typeof allowedConfig.tracing[number];
runtime: typeof allowedConfig.runtime[number]; //currently this doesnt restrict the runtime to nodejs
architecture: typeof allowedConfig.architecture[number]; //currently this doesnt restrict the architecture
runtime: typeof allowedConfig.runtime[number]; //currently this doesn't restrict the runtime to nodejs
architecture: typeof allowedConfig.architecture[number]; //currently this doesn't restrict the architecture
}

export interface RequiredLambdaConfig extends Partial<NodejsFunctionProps> {
/**
* Please look at https://aleios-cloud.github.io/sls-constructs/docs/Lambda#function-name for documentation
* @required true
*/
functionName: string;
/**
* Please look at https://aleios-cloud.github.io/sls-constructs/docs/Lambda#entry for documentation
* @required true
*/
entry: string;
}

export interface AleiosLambdaProps extends RequiredLambdaConfig {
/**
* Please look at https://aleios-cloud.github.io/sls-constructs/docs/Lambda#runtime for documentation
* @default Runtime.NODEJS_18_X,
*/
runtime?: RestrictedLambdaConfig['runtime'];
/**
* Please look at https://aleios-cloud.github.io/sls-constructs/docs/Lambda#architecture for documentation
* @default Architecture.ARM_64
*/
architecture?: RestrictedLambdaConfig['architecture'];
/**
* Please look at https://aleios-cloud.github.io/sls-constructs/docs/Lambda#tracing for documentation
* @default Tracing.ACTIVE
*/
tracing?: RestrictedLambdaConfig['tracing'];
/**
* Please look at https://aleios-cloud.github.io/sls-constructs/docs/Lambda#retry-attempts for documentation
* @default 2
*/
retryAttempts?: RestrictedLambdaConfig['retryAttempts'];
}

0 comments on commit a787bfb

Please sign in to comment.