Skip to content

Commit 1da5049

Browse files
committed
feat: add destroy() to types and releated unit tests
1 parent d3d6db5 commit 1da5049

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/types/src/client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ interface InvokeFunction<
4646

4747
/**
4848
* A general interface for service clients, idempotent to browser or node clients
49+
* This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/master/packages/smithy-client/src/client.ts).
50+
* It's provided for using without importing the SmithyClient class.
4951
*/
5052
export interface Client<
5153
Input extends object,
@@ -55,4 +57,5 @@ export interface Client<
5557
readonly config: ResolvedClientConfiguration;
5658
middlewareStack: MiddlewareStack<Input, Output>;
5759
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
60+
destroy: () => void;
5861
}

packages/util-create-request/src/foo.fixture.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export const fooClient: Client<any, InputTypesUnion, OutputTypesUnion, any> = {
3636
this.middlewareStack,
3737
this.config,
3838
undefined
39-
)({ input })
39+
)({ input }),
40+
destroy: () => {}
4041
};
4142

4243
export const operationCommand: Command<

0 commit comments

Comments
 (0)