From 16fbe1eedd0866ba6b1f9101c8e6ae01bc30cb51 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sun, 8 May 2022 23:21:28 +0200 Subject: [PATCH] chore: fix lint warning in address module --- src/modules/address/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/address/index.ts b/src/modules/address/index.ts index db82e01eb4d..bf50c7c5218 100644 --- a/src/modules/address/index.ts +++ b/src/modules/address/index.ts @@ -268,7 +268,7 @@ export class Address { * faker.address.countryCode('alpha-3') // 'TJK' */ countryCode(alphaCode: 'alpha-2' | 'alpha-3' = 'alpha-2'): string { - const key: keyof typeof this.faker.definitions.address = + const key = alphaCode === 'alpha-3' ? 'country_code_alpha_3' : 'country_code'; return this.faker.helpers.arrayElement(this.faker.definitions.address[key]);