Checkboxes for prior research
Describe the bug
When upgrading from SDK version 3.812.0 to version 3.996.0, I was surprised to find that the visit method of union namespaces is no longer available after a minor version upgrade. This seems to have happened in this commit but I couldn't find any mention of this in the release changelogs since that commit.
Regression Issue
SDK version number
@aws-sdk/client-* 3.996.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.14.0
Reproduction Steps
import { ContentBlockDelta } from '@aws-sdk/client-bedrock-runtime';
function processContentBlockDelta(d: ContentBlockDelta) {
return ContentBlockDelta.visit(d, {
text() {
// process text delta
},
// ... other members
});
}
Observed Behavior
I get a type error: "Cannot use namespace 'ContentBlockDelta' as a value."
Expected Behavior
A visit function is provided to decide how to process a union.
Possible Solution
Revert the parts of 6362fe2 that remove the visit function.
Additional Information/Context
No response
Checkboxes for prior research
Describe the bug
When upgrading from SDK version 3.812.0 to version 3.996.0, I was surprised to find that the
visitmethod of union namespaces is no longer available after a minor version upgrade. This seems to have happened in this commit but I couldn't find any mention of this in the release changelogs since that commit.Regression Issue
SDK version number
@aws-sdk/client-* 3.996.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.14.0
Reproduction Steps
Observed Behavior
I get a type error: "Cannot use namespace 'ContentBlockDelta' as a value."
Expected Behavior
A
visitfunction is provided to decide how to process a union.Possible Solution
Revert the parts of 6362fe2 that remove the
visitfunction.Additional Information/Context
No response