feat(lib-dynamodb): expose transact write item types#7852
Open
lucianlature-endava wants to merge 5 commits intoaws:mainfrom
Open
feat(lib-dynamodb): expose transact write item types#7852lucianlature-endava wants to merge 5 commits intoaws:mainfrom
lucianlature-endava wants to merge 5 commits intoaws:mainfrom
Conversation
c51c248 to
39a528a
Compare
bd29e4e to
ef1ee1a
Compare
ef1ee1a to
cffb7e4
Compare
kuhe
reviewed
Apr 24, 2026
| | undefined | ||
| ; | ||
| export type BatchExecuteStatementCommandInput = Omit<__BatchExecuteStatementCommandInput, "Statements"> & { | ||
| Statements: BatchExecuteStatementBatchStatementRequest[] | undefined; |
Contributor
There was a problem hiding this comment.
why not just use the type BatchExecuteStatementCommandInput["Statements"]?
Author
There was a problem hiding this comment.
That would hit a self-reference: BatchExecuteStatementCommandInput["Statements"] will expand to "the type of the Statements property on BatchExecuteStatementCommandInput". But BatchExecuteStatementCommandInput itself is currently being defined, and its Statements property’s type is exactly what we’re trying to specify, so we'll end up with a circular definition, and TypeScript generally can't resolve that as a meaningful alias.
A non-circular DRY version would look like:
export type BatchExecuteStatementStatements = BatchExecuteStatementBatchStatementRequest[] | undefined;
export type BatchExecuteStatementCommandInput = Omit<__BatchExecuteStatementCommandInput, "Statements"> & {
Statements: BatchExecuteStatementStatements;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
#7830
Description
Exposes document-client types for TransactWriteItems so consumers can type transaction items instead of using inline shapes.
Changes:
Testing
cd lib/lib-dynamodb && yarn build:typescd lib/lib-dynamodb && yarn testChecklist
*.integ.spec.ts) or E2E tests.@public,@internaltags and enabled doc generation on the package. Remember that access level annotations go below the description, not above.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.