diff --git a/src/database.ts b/src/database.ts index c0513bbc5ec..abfaea85315 100644 --- a/src/database.ts +++ b/src/database.ts @@ -38,7 +38,7 @@ export class Database { * * @method faker.database.column */ - column() { + column(): string { return this.faker.random.arrayElement( this.faker.definitions.database.column ); @@ -49,7 +49,7 @@ export class Database { * * @method faker.database.type */ - type() { + type(): string { return this.faker.random.arrayElement(this.faker.definitions.database.type); } @@ -58,7 +58,7 @@ export class Database { * * @method faker.database.collation */ - collation() { + collation(): string { return this.faker.random.arrayElement( this.faker.definitions.database.collation ); @@ -69,7 +69,7 @@ export class Database { * * @method faker.database.engine */ - engine() { + engine(): string { return this.faker.random.arrayElement( this.faker.definitions.database.engine ); diff --git a/src/finance.ts b/src/finance.ts index 4ccc06bdd7b..34786faae90 100644 --- a/src/finance.ts +++ b/src/finance.ts @@ -153,7 +153,7 @@ export class Finance { * * @method faker.finance.currencyCode */ - currencyCode() { + currencyCode(): string { // TODO @Shinigami92 2022-01-14: missing second parameter // @ts-expect-error return this.faker.random.objectElement( @@ -166,7 +166,7 @@ export class Finance { * * @method faker.finance.currencyName */ - currencyName() { + currencyName(): string { return this.faker.random.objectElement( this.faker.definitions.finance.currency, 'key' @@ -178,7 +178,7 @@ export class Finance { * * @method faker.finance.currencySymbol */ - currencySymbol() { + currencySymbol(): string { let symbol; while (!symbol) { diff --git a/src/hacker.ts b/src/hacker.ts index ee36d814d43..dac9b4f6d9e 100644 --- a/src/hacker.ts +++ b/src/hacker.ts @@ -16,7 +16,7 @@ export class Hacker { * * @method faker.hacker.abbreviation */ - abbreviation() { + abbreviation(): string { return this.faker.random.arrayElement( this.faker.definitions.hacker.abbreviation ); @@ -27,7 +27,7 @@ export class Hacker { * * @method faker.hacker.adjective */ - adjective() { + adjective(): string { return this.faker.random.arrayElement( this.faker.definitions.hacker.adjective ); @@ -38,7 +38,7 @@ export class Hacker { * * @method faker.hacker.noun */ - noun() { + noun(): string { return this.faker.random.arrayElement(this.faker.definitions.hacker.noun); } @@ -47,7 +47,7 @@ export class Hacker { * * @method faker.hacker.verb */ - verb() { + verb(): string { return this.faker.random.arrayElement(this.faker.definitions.hacker.verb); } @@ -56,7 +56,7 @@ export class Hacker { * * @method faker.hacker.ingverb */ - ingverb() { + ingverb(): string { return this.faker.random.arrayElement( this.faker.definitions.hacker.ingverb ); @@ -67,7 +67,7 @@ export class Hacker { * * @method faker.hacker.phrase */ - phrase() { + phrase(): string { const data = { abbreviation: this.abbreviation, adjective: this.adjective,