Skip to content

Commit

Permalink
chore: use inline nullish coalescing instead of helper
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Jul 21, 2021
1 parent ee3735d commit 123a4cf
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
case BROWSER:
return MapUtils.of(
"endpointDiscoveryEnabledProvider", writer -> {
writer.write("() => Promise.resolve(undefined)");
writer.write("(() => Promise.resolve(undefined))");
}
);
case NODE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
writer.addDependency(TypeScriptDependency.INVALID_DEPENDENCY);
writer.addImport("invalidFunction", "invalidFunction",
TypeScriptDependency.INVALID_DEPENDENCY.packageName);
writer.openBlock("() => ({", "})", () -> {
writer.openBlock("(() => ({", "}))", () -> {
writer.write("handle: invalidFunction(\"event stream request is not supported in browser.\"),");
});
});
Expand All @@ -121,7 +121,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
writer.addDependency(TypeScriptDependency.INVALID_DEPENDENCY);
writer.addImport("invalidFunction", "invalidFunction",
TypeScriptDependency.INVALID_DEPENDENCY.packageName);
writer.openBlock("() => ({", "})", () -> {
writer.openBlock("(() => ({", "}))", () -> {
writer.write("handle: invalidFunction(\"event stream request "
+ "is not supported in ReactNative.\"),");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
writer.addDependency(AwsDependency.TRANSCRIBE_STREAMING_MIDDLEWARE);
writer.addImport("eventStreamPayloadHandler", "eventStreamPayloadHandler",
AwsDependency.TRANSCRIBE_STREAMING_MIDDLEWARE.packageName);
writer.write("() => eventStreamPayloadHandler");
writer.write("(() => eventStreamPayloadHandler)");
},
"requestHandler", writer -> {
writer.addDependency(AwsDependency.TRANSCRIBE_STREAMING_MIDDLEWARE);
Expand Down
1 change: 0 additions & 1 deletion packages/smithy-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export * from "./extended-encode-uri-component";
export * from "./get-array-if-single-item";
export * from "./get-value-from-text-node";
export * from "./lazy-json";
export * from "./nullish-coalescing";
export * from "./parse-utils";
export * from "./ser-utils";
export * from "./date-utils";
Expand Down
7 changes: 0 additions & 7 deletions packages/smithy-client/src/nullish-coalescing.ts

This file was deleted.

0 comments on commit 123a4cf

Please sign in to comment.