From 20d72807076de78bd045146bb61db163b7fedcc8 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Fri, 4 Feb 2022 18:28:42 -0800 Subject: [PATCH] fix: optional args on faker.finance.iban() `faker.finance.iban()` is a valid use of Faker. However in TypeScript you get a type error because the optional `formatted` and `countryCode` args are not marked as optional like in other functions. Tests are written against the cjs bundle without types so did not catch the error. --- src/finance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finance.ts b/src/finance.ts index 9a7592518b5..09a47382c07 100644 --- a/src/finance.ts +++ b/src/finance.ts @@ -293,7 +293,7 @@ export class Finance { * * @method faker.finance.iban */ - iban(formatted: boolean = false, countryCode: string): string { + iban(formatted: boolean = false, countryCode?: string): string { let ibanFormat: { bban: Array<{ type: string; count: number }>; country: string;