Skip to content

Commit

Permalink
refactor: tighter variable scoping
Browse files Browse the repository at this point in the history
note that without the type def it falls back to 'any'

'response' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)
  • Loading branch information
tomwwright committed Sep 27, 2023
1 parent 932d78e commit 2b5af44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ export class LazyLookupExport implements LookupExport {

private async * listExports() {
let nextToken: string | undefined = undefined;
let response: PromiseResult<AWS.CloudFormation.ListExportsOutput, AWS.AWSError>;
while (true) {
response = await this.sdk.cloudFormation().listExports({
const response: PromiseResult<AWS.CloudFormation.ListExportsOutput, AWS.AWSError> = await this.sdk.cloudFormation().listExports({
NextToken: nextToken,
}).promise();

Expand Down

0 comments on commit 2b5af44

Please sign in to comment.