Skip to content

Commit bc38be7

Browse files
committed
fix: indentation in ts to use 4 spaces instead of 2
1 parent 78c7611 commit bc38be7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

templates/cli/lib/type-generation/languages/typescript.js.twig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,21 @@ class TypeScript extends LanguageMeta {
8080
export enum <%- toPascalCase(attribute.key) %> {
8181
<% const entries = Object.entries(attribute.elements); -%>
8282
<% for (let i = 0; i < entries.length; i++) { -%>
83-
<%- toUpperSnakeCase(entries[i][1]) %> = "<%- entries[i][1] %>"<% if (i !== entries.length - 1) { %>,<% } %>
83+
<%- toUpperSnakeCase(entries[i][1]) %> = "<%- entries[i][1] %>"<% if (i !== entries.length - 1) { %>,<% } %>
8484
<% } -%>
8585
}
8686

8787
<% } -%>
8888
<% } -%>
8989
<% } -%>
90-
<% for (const collection of collections) { -%>
90+
<% for (const [index, collection] of Object.entries(collections)) { -%>
9191
export type <%- toPascalCase(collection.name) %> = Models.Document & {
9292
<% for (const attribute of collection.attributes) { -%>
93-
<%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- getType(attribute) %>;
93+
<%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- getType(attribute) %>;
9494
<% } -%>
95-
}
96-
97-
<% } %>`;
95+
}<% if (index < collections.length - 1) { %>
96+
<% } %>
97+
<% } -%>`;
9898
}
9999

100100
getFileName(_) {

0 commit comments

Comments
 (0)