Skip to content

Commit

Permalink
Replace JSDoc types with TS
Browse files Browse the repository at this point in the history
  • Loading branch information
domdomegg committed Mar 17, 2024
1 parent 5656e17 commit 78d35af
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,14 @@ class ServerlessDynamoDBPlugin implements Plugin {
return this.config?.start?.host ?? 'localhost';
}

/**
* Get the stage
*
* @return {String} the current stage
*/
get stage() {
get stage(): string {
return (this.options && this.options.stage) || (this.serverless.service.provider && this.serverless.service.provider.stage);
}

/**
* To check if the handler needs to be executed based on stage
*
* @return {Boolean} if the handler can run for the provided stage
*/
shouldExecute() {
* Check if the handler needs to be executed based on stage
*/
shouldExecute(): boolean {
if (!this.config.stages || this.config.stages.includes(this.stage)) {
return true;
}
Expand Down

0 comments on commit 78d35af

Please sign in to comment.