Skip to content

Commit

Permalink
Make methods naming more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
FirentisTFW committed Mar 16, 2024
1 parent aeef2b3 commit 06ed71a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/generators/file_content/base_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ abstract class BaseFileContentGenerator implements FileContentGenerator {
return knob;
}

// If none of the cases from [knobForType] matches, it's probably a custom enum.
return this.knobForEnum(name, type, field.nullable);
// If none of the cases from `knobForType` matches, it's probably a custom enum.
return this.enumKnob(name, type, field.nullable);
}

private checkForFunction(type: string): string | undefined {
Expand All @@ -165,7 +165,7 @@ abstract class BaseFileContentGenerator implements FileContentGenerator {
return `(${underscoresForParameters}) {}`;
}

protected knobForEnum(name: string, type: string, nullable: boolean): string {
protected enumKnob(name: string, type: string, nullable: boolean): string {
if (nullable) {
return `context.knobs.listOrNull(label: '${name}', options: [null, ...${type}.values])`;
}
Expand Down

0 comments on commit 06ed71a

Please sign in to comment.