Skip to content

Commit

Permalink
chore: use array Shorthand symtax (rebased from master)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed May 13, 2020
1 parent 117cc8e commit 8ad8f91
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion clients/client-device-farm/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4852,7 +4852,7 @@ export namespace ListUniqueProblemsResult {
...obj,
...(obj.uniqueProblems && {
uniqueProblems: Object.entries(obj.uniqueProblems).reduce(
(acc: any, [key, value]: [string, Array<UniqueProblem>]) => {
(acc: any, [key, value]: [string, UniqueProblem[]]) => {
acc[key] = value.map(UniqueProblem.filterSensitiveLog);
return acc;
},
Expand Down
10 changes: 5 additions & 5 deletions clients/client-dynamodb/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ export namespace BatchGetItemOutput {
Responses: Object.entries(obj.Responses).reduce(
(
acc: any,
[key, value]: [string, Array<{ [key: string]: AttributeValue }>]
[key, value]: [string, { [key: string]: AttributeValue }[]]
) => {
acc[key] = value.map(item =>
Object.entries(item).reduce(
Expand Down Expand Up @@ -1193,7 +1193,7 @@ export namespace BatchWriteItemInput {
...obj,
...(obj.RequestItems && {
RequestItems: Object.entries(obj.RequestItems).reduce(
(acc: any, [key, value]: [string, Array<WriteRequest>]) => {
(acc: any, [key, value]: [string, WriteRequest[]]) => {
acc[key] = value.map(WriteRequest.filterSensitiveLog);
return acc;
},
Expand Down Expand Up @@ -1303,7 +1303,7 @@ export namespace BatchWriteItemOutput {
}),
...(obj.ItemCollectionMetrics && {
ItemCollectionMetrics: Object.entries(obj.ItemCollectionMetrics).reduce(
(acc: any, [key, value]: [string, Array<ItemCollectionMetrics>]) => {
(acc: any, [key, value]: [string, ItemCollectionMetrics[]]) => {
acc[key] = value.map(ItemCollectionMetrics.filterSensitiveLog);
return acc;
},
Expand All @@ -1312,7 +1312,7 @@ export namespace BatchWriteItemOutput {
}),
...(obj.UnprocessedItems && {
UnprocessedItems: Object.entries(obj.UnprocessedItems).reduce(
(acc: any, [key, value]: [string, Array<WriteRequest>]) => {
(acc: any, [key, value]: [string, WriteRequest[]]) => {
acc[key] = value.map(WriteRequest.filterSensitiveLog);
return acc;
},
Expand Down Expand Up @@ -9021,7 +9021,7 @@ export namespace TransactWriteItemsOutput {
}),
...(obj.ItemCollectionMetrics && {
ItemCollectionMetrics: Object.entries(obj.ItemCollectionMetrics).reduce(
(acc: any, [key, value]: [string, Array<ItemCollectionMetrics>]) => {
(acc: any, [key, value]: [string, ItemCollectionMetrics[]]) => {
acc[key] = value.map(ItemCollectionMetrics.filterSensitiveLog);
return acc;
},
Expand Down
2 changes: 1 addition & 1 deletion clients/client-forecastquery/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export namespace Forecast {
...obj,
...(obj.Predictions && {
Predictions: Object.entries(obj.Predictions).reduce(
(acc: any, [key, value]: [string, Array<DataPoint>]) => {
(acc: any, [key, value]: [string, DataPoint[]]) => {
acc[key] = value.map(DataPoint.filterSensitiveLog);
return acc;
},
Expand Down
2 changes: 1 addition & 1 deletion clients/client-lightsail/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ export namespace CreateInstancesFromSnapshotRequest {
}),
...(obj.attachedDiskMapping && {
attachedDiskMapping: Object.entries(obj.attachedDiskMapping).reduce(
(acc: any, [key, value]: [string, Array<DiskMap>]) => {
(acc: any, [key, value]: [string, DiskMap[]]) => {
acc[key] = value.map(DiskMap.filterSensitiveLog);
return acc;
},
Expand Down
2 changes: 1 addition & 1 deletion clients/client-pinpoint-email/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ export namespace GetBlacklistReportsResponse {
...obj,
...(obj.BlacklistReport && {
BlacklistReport: Object.entries(obj.BlacklistReport).reduce(
(acc: any, [key, value]: [string, Array<BlacklistEntry>]) => {
(acc: any, [key, value]: [string, BlacklistEntry[]]) => {
acc[key] = value.map(BlacklistEntry.filterSensitiveLog);
return acc;
},
Expand Down
5 changes: 1 addition & 4 deletions clients/client-service-catalog/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7137,10 +7137,7 @@ export namespace SearchProductsOutput {
ProductViewAggregations: Object.entries(
obj.ProductViewAggregations
).reduce(
(
acc: any,
[key, value]: [string, Array<ProductViewAggregationValue>]
) => {
(acc: any, [key, value]: [string, ProductViewAggregationValue[]]) => {
acc[key] = value.map(ProductViewAggregationValue.filterSensitiveLog);
return acc;
},
Expand Down
2 changes: 1 addition & 1 deletion clients/client-sesv2/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1876,7 +1876,7 @@ export namespace GetBlacklistReportsResponse {
...obj,
...(obj.BlacklistReport && {
BlacklistReport: Object.entries(obj.BlacklistReport).reduce(
(acc: any, [key, value]: [string, Array<BlacklistEntry>]) => {
(acc: any, [key, value]: [string, BlacklistEntry[]]) => {
acc[key] = value.map(BlacklistEntry.filterSensitiveLog);
return acc;
},
Expand Down
2 changes: 1 addition & 1 deletion clients/client-xray/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2614,7 +2614,7 @@ export namespace TraceSummary {
...obj,
...(obj.Annotations && {
Annotations: Object.entries(obj.Annotations).reduce(
(acc: any, [key, value]: [string, Array<ValueWithServiceIds>]) => {
(acc: any, [key, value]: [string, ValueWithServiceIds[]]) => {
acc[key] = value.map(ValueWithServiceIds.filterSensitiveLog);
return acc;
},
Expand Down

0 comments on commit 8ad8f91

Please sign in to comment.