From 2b5af445857490763362c8a63094cf0608ebee00 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Wed, 27 Sep 2023 14:07:50 +1000 Subject: [PATCH] refactor: tighter variable scoping 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) --- packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts b/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts index 5a3b11f705ab7..2592c33423f2a 100644 --- a/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts +++ b/packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts @@ -67,9 +67,8 @@ export class LazyLookupExport implements LookupExport { private async * listExports() { let nextToken: string | undefined = undefined; - let response: PromiseResult; while (true) { - response = await this.sdk.cloudFormation().listExports({ + const response: PromiseResult = await this.sdk.cloudFormation().listExports({ NextToken: nextToken, }).promise();