-
Notifications
You must be signed in to change notification settings - Fork 620
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
Pretty simple. Set exactOptionalPropertyTypes=true in 3.693.0 (this morning's latest NPM release) and compile. You will get transpiration errors such as:
BatchStatementRequest' is not assignable to type '{ Parameters?: any[]; }' with 'exactOptionalPropertyTypes: true
Set it to false, and there is no issue.
This causes problems for any project that is using the flag.
I have the following installed in my npm dependencies:
"@aws-sdk/client-cloudwatch-logs": "^3.693.0",
"@aws-sdk/client-s3": "^3.693.0",
"@aws-sdk/credential-providers": "^3.693.0",
"@aws-sdk/lib-dynamodb": "^3.693.0",
It does NOT happen in 3.687.0. Not sure about versions in between.
Node V20.2.0, Typescript 5.6.3 for both working and non-working versions
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Node V20.2.0, Typescript 5.6.3
Reproduction Steps
set exactOptionalPropertyTypes=true and transpile using tsc
Observed Behavior
Typescript errors within AWS v3 library such as
BatchStatementRequest' is not assignable to type '{ Parameters?: any[]; }' with 'exactOptionalPropertyTypes: true
Expected Behavior
No typescript errors
Possible Solution
workaround is to set exactOptionalPropertyTypes=false
Additional Information/Context
No response