You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The promise() APIs are not removed from functions if the client is created in constructor
Steps to reproduce
importAWSfrom"aws-sdk";// Client as class memberclassClientClassMember{clientInClass: AWS.DynamoDB;constructor(){this.clientInClass=newAWS.DynamoDB();}asynclistTables(){returnawaitthis.clientInClass.listTables().promise();}asynclistTagsOfResource(){returnawaitthis.clientInClass.listTagsOfResource({ResourceArn: "STRING_VALUE"}).promise();}}
Observed behavior
import{DynamoDB}from"@aws-sdk/client-dynamodb";// Client as class memberclassClientClassMember{clientInClass: DynamoDB;constructor(){this.clientInClass=newDynamoDB();}asynclistTables(){returnawaitthis.clientInClass.listTables().promise();}asynclistTagsOfResource(){returnawaitthis.clientInClass.listTagsOfResource({ResourceArn: "STRING_VALUE"}).promise();}}
Expected behavior
import{DynamoDB}from"@aws-sdk/client-dynamodb";// Client as class memberclassClientClassMember{clientInClass: DynamoDB;constructor(){this.clientInClass=newDynamoDB();}asynclistTables(){returnawaitthis.clientInClass.listTables();}asynclistTagsOfResource(){returnawaitthis.clientInClass.listTagsOfResource({ResourceArn: "STRING_VALUE"});}}
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Self-service
Describe the bug
The promise() APIs are not removed from functions if the client is created in constructor
Steps to reproduce
Observed behavior
Expected behavior
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: