Skip to content

Commit

Permalink
chore: add function return types
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Jan 11, 2022
1 parent 95e9c75 commit b4fff01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/git.ts
Expand Up @@ -35,7 +35,7 @@ export class Git {
*
* @method faker.git.branch
*/
branch() {
branch(): string {
const noun = this.faker.hacker.noun().replace(' ', '-');
const verb = this.faker.hacker.verb().replace(' ', '-');
return noun + '-' + verb;
Expand All @@ -47,7 +47,7 @@ export class Git {
* @method faker.git.commitEntry
* @param options
*/
commitEntry(options: { merge?: boolean } = {}) {
commitEntry(options: { merge?: boolean } = {}): string {
// TODO @Shinigami92 2022-01-11: We may want to make it configurable to use just `\n` instead of `\r\n`
let entry = 'commit {{git.commitSha}}\r\n';

Expand All @@ -68,7 +68,7 @@ export class Git {
*
* @method faker.git.commitMessage
*/
commitMessage() {
commitMessage(): string {
const format = '{{hacker.verb}} {{hacker.adjective}} {{hacker.noun}}';
return this.faker.fake(format);
}
Expand All @@ -78,7 +78,7 @@ export class Git {
*
* @method faker.git.commitSha
*/
commitSha() {
commitSha(): string {
let commit = '';

for (let i = 0; i < 40; i++) {
Expand All @@ -93,7 +93,7 @@ export class Git {
*
* @method faker.git.shortSha
*/
shortSha() {
shortSha(): string {
let shortSha = '';

for (let i = 0; i < 7; i++) {
Expand Down

0 comments on commit b4fff01

Please sign in to comment.