File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
templates/cli/lib/type-generation/languages Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -80,21 +80,21 @@ class TypeScript extends LanguageMeta {
80
80
export enum <% - toPascalCase(attribute.key) %> {
81
81
<% const entries = Object .entries(attribute.elements); -%>
82
82
<% 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 ) { %> ,<% } %>
84
84
<% } -%>
85
85
}
86
86
87
87
<% } -%>
88
88
<% } -%>
89
89
<% } -%>
90
- <% for (const collection of collections) { -%>
90
+ <% for (const [index, collection] of Object .entries( collections) ) { -%>
91
91
export type <% - toPascalCase(collection.name) %> = Models.Document & {
92
92
<% for (const attribute of collection.attributes) { -%>
93
- <% - strict ? toCamelCase(attribute.key) : attribute.key %> : <% - getType(attribute) %> ;
93
+ <% - strict ? toCamelCase(attribute.key) : attribute.key %> : <% - getType(attribute) %> ;
94
94
<% } -%>
95
- }
96
-
97
- <% } %> `;
95
+ }<% if (index < collections.length - 1 ) { %>
96
+ <% } %>
97
+ <% } - %> `;
98
98
}
99
99
100
100
getFileName(_) {
You can’t perform that action at this time.
0 commit comments