Skip to content

Commit

Permalink
fix: optional args on faker.finance.iban()
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
dantman committed Feb 5, 2022
1 parent 0ee39d1 commit 20d7280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/finance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20d7280

Please sign in to comment.