diff options
| author | Shinigami <[email protected]> | 2022-01-30 18:55:06 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-30 18:55:06 +0100 |
| commit | d4125e2a7d69042c37ccecea89f1525c4424a45b (patch) | |
| tree | 99f9a997e0bd32b034c9a15d53a7a3ac957911cf /src/address.ts | |
| parent | 730ca6a65a29038636e8cc3eec12eacf929db7fb (diff) | |
| download | faker-d4125e2a7d69042c37ccecea89f1525c4424a45b.tar.xz faker-d4125e2a7d69042c37ccecea89f1525c4424a45b.zip | |
chore: use explicit-module-boundary-types (#361)
Diffstat (limited to 'src/address.ts')
| -rw-r--r-- | src/address.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/address.ts b/src/address.ts index f45bf487..7e6b0fdc 100644 --- a/src/address.ts +++ b/src/address.ts @@ -47,7 +47,7 @@ export class Address { * @method faker.address.zipCode * @param format */ - zipCode(format?: string) { + zipCode(format?: string): string { // if zip format is not specified, use the zip format defined for the locale if (typeof format === 'undefined') { const localeFormat = this.faker.definitions.address.postcode; @@ -70,7 +70,7 @@ export class Address { * @method faker.address.zipCodeByState * @param state */ - zipCodeByState(state: string) { + zipCodeByState(state: string): string | number { const zipRange = this.faker.definitions.address.postcode_by_state[state]; if (zipRange) { return this.faker.datatype.number(zipRange); @@ -94,7 +94,7 @@ export class Address { * @method faker.address.city * @param format */ - city(format?: string | number) { + city(format?: string | number): string { const formats = [ '{{address.cityPrefix}} {{name.firstName}}{{address.citySuffix}}', '{{address.cityPrefix}} {{name.firstName}}', @@ -353,7 +353,7 @@ export class Address { * @method faker.address.direction * @param useAbbr return direction abbreviation. defaults to false */ - direction(useAbbr: boolean = false) { + direction(useAbbr: boolean = false): string { if (!useAbbr) { return this.faker.random.arrayElement( this.faker.definitions.address.direction |
