Skip to content

Commit 785282e

Browse files
committed
fix(core): type fix to allow deprecated protected signature
1 parent 5ab4f99 commit 785282e

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.changeset/tall-cheetahs-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smithy/core": patch
3+
---
4+
5+
allow old signature in protected method

packages/core/src/submodules/protocols/HttpProtocol.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,36 @@ export abstract class HttpProtocol implements ClientProtocol<IHttpRequest, IHttp
143143
};
144144
}
145145

146+
/**
147+
* @deprecated use signature without headerBindings.
148+
*/
146149
protected async deserializeHttpMessage(
147150
schema: Schema,
148151
context: HandlerExecutionContext & SerdeFunctions,
149152
response: IHttpResponse,
153+
headerBindings: Set<string>,
150154
dataObject: any
155+
): Promise<string[]>;
156+
protected async deserializeHttpMessage(
157+
schema: Schema,
158+
context: HandlerExecutionContext & SerdeFunctions,
159+
response: IHttpResponse,
160+
dataObject: any
161+
): Promise<string[]>;
162+
protected async deserializeHttpMessage(
163+
schema: Schema,
164+
context: HandlerExecutionContext & SerdeFunctions,
165+
response: IHttpResponse,
166+
arg4: unknown,
167+
arg5?: unknown
151168
): Promise<string[]> {
169+
let dataObject: any;
170+
if (arg4 instanceof Set) {
171+
dataObject = arg5;
172+
} else {
173+
dataObject = arg4;
174+
}
175+
152176
const deserializer = this.deserializer;
153177
const ns = NormalizedSchema.of(schema);
154178
const nonHttpBindingMembers = [] as string[];

0 commit comments

Comments
 (0)