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 14, 2022
1 parent 57b40c9 commit dc8fdba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/git.ts
Original file line number Diff line number Diff line change
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 dc8fdba

Please sign in to comment.