Skip to content

Commit 7ee70a7

Browse files
committed
fix: address style suggestions--FP
1 parent a3fdc01 commit 7ee70a7

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

clients/node/client-rds-data-node/RDSDataClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from "./RDSDataConfiguration";
1010
import { RegionConfiguration, EndpointsConfig, ProtocolConfig } from '@aws-sdk/config-resolver';
1111
import { HttpOptions, MetadataBearer } from '@aws-sdk/types';
12-
import { SmithyClient } from "@aws-sdk/smithy-client";
12+
import { Client as SmithyClient } from "@aws-sdk/smithy-client";
1313

1414
type InputTypesUnion = any;
1515
type OutputTypesUnion = MetadataBearer;

clients/node/client-rds-data-node/commands/ExecuteStatementCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class ExecuteStatementCommand extends Command<ExecuteStatementInput, Exec
4141
};
4242

4343
return stack.resolve(
44-
(request: FinalizeHandlerArguments<any>) => { return httpHandler.handle(request.request as HttpRequest, options || {}) },
44+
(request: FinalizeHandlerArguments<any>) => httpHandler.handle(request.request as HttpRequest, options || {}),
4545
handlerExecutionContext
4646
);
4747
}

packages/smithy-client/src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type SmithyResolvedConfiguration<HandlerOptions> = SmithyConfiguration<
1515
HandlerOptions
1616
>;
1717

18-
export class SmithyClient<
18+
export class Client<
1919
HandlerOptions = any,
2020
ClientInput extends object = any,
2121
ClientOutput extends MetadataBearer = any
@@ -31,7 +31,7 @@ export class SmithyClient<
3131
) {
3232
const { middleware, step, priority, tags } = injectable;
3333
this.middlewareStack.add(
34-
// @ts-ignore
34+
// @ts-ignore -- Middleware and option type matching safety is enforced by InjectableMiddleware types
3535
middleware,
3636
{
3737
step: options.step || step,
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { StreamCollector } from "@aws-sdk/types";
22

3-
export const streamCollector: StreamCollector = function streamCollector(
3+
export const streamCollector: StreamCollector = (
44
stream: Blob
5-
): Promise<Uint8Array> {
6-
return new Promise<Uint8Array>((resolve, reject) => {
5+
): Promise<Uint8Array> =>
6+
new Promise<Uint8Array>((resolve, reject) => {
77
const reader = new FileReader();
88
reader.onload = () => resolve(new Uint8Array(reader.result as ArrayBuffer));
99
reader.onabort = () => reject(new Error("Read aborted"));
1010
reader.onerror = () => reject(reader.error);
1111
reader.readAsArrayBuffer(stream);
1212
});
13-
};

packages/stream-collector-node/src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { Readable } from "stream";
22
import { StreamCollector } from "@aws-sdk/types";
33
import { Collector } from "./collector";
44

5-
export const streamCollector: StreamCollector = function streamCollector(
5+
export const streamCollector: StreamCollector = (
66
stream: Readable
7-
): Promise<Uint8Array> {
8-
return new Promise((resolve, reject) => {
7+
): Promise<Uint8Array> =>
8+
new Promise((resolve, reject) => {
99
const collector = new Collector();
1010
stream.pipe(collector);
1111
stream.on("error", err => {
@@ -19,4 +19,3 @@ export const streamCollector: StreamCollector = function streamCollector(
1919
resolve(bytes);
2020
});
2121
});
22-
};

0 commit comments

Comments
 (0)