Skip to content

Commit

Permalink
Fixed format of entry-types
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Aug 9, 2024
1 parent 3944c5e commit 346f00d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{#if (includes previous_file_content "export type EntryTypes = never;")}}
{{replace previous_file_content "export type EntryTypes = never;" (concat "export type EntryTypes =\n | ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ");")}}
{{replace previous_file_content "export type EntryTypes = never;" (concat "export type EntryTypes = ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ");")}}
{{else}}
{{replace previous_file_content "export type EntryTypes =" (concat "export type EntryTypes =\n | ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ")")}}
{{replace previous_file_content "export type EntryTypes =" (concat "export type EntryTypes = ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ") | ")}}
{{/if}}

{{#each entry_type.fields}}
Expand Down
4 changes: 2 additions & 2 deletions templates/zome/entry-type/ui/src/types.ts.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{#if (includes previous_file_content "export type EntryTypes = never;")}}
{{replace previous_file_content "export type EntryTypes = never;" (concat "export type EntryTypes =\n | ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ");")}}
{{replace previous_file_content "export type EntryTypes = never;" (concat "export type EntryTypes = ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ");")}}
{{else}}
{{replace previous_file_content "export type EntryTypes =" (concat "export type EntryTypes =\n | ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ")")}}
{{replace previous_file_content "export type EntryTypes =" (concat "export type EntryTypes = ({ type: '" (pascal_case entry_type.name) "'; } & " (pascal_case entry_type.name) ") | ")}}
{{/if}}

{{#each entry_type.fields}}
Expand Down

0 comments on commit 346f00d

Please sign in to comment.