File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
templates/cli/lib/type-generation/languages Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,13 @@ class JavaScript extends LanguageMeta {
62
62
}
63
63
64
64
getTemplate() {
65
- return `
66
- // This file is auto-generated by the Appwrite CLI.
67
- // You can regenerate it by running \`appwrite types -l <% - strict ? ' --strict ' : ' ' %> js <% - path %> \`.
68
-
69
- /**
65
+ return `/**
70
66
* @typedef {import('${this._getAppwriteDependency()}').Models.Document} Document
71
67
*/
72
68
69
+ // This file is auto-generated by the Appwrite CLI.
70
+ // You can regenerate it by running \`appwrite types -l <% - strict ? ' --strict ' : ' ' %> js <% - path %> \`.
71
+
73
72
<% for (const collection of collections) { -%>
74
73
<% for (const attribute of collection.attributes) { -%>
75
74
<% if (attribute.format === ' enum' ) { -%>
@@ -80,14 +79,15 @@ class JavaScript extends LanguageMeta {
80
79
<% } -%>
81
80
<% } -%>
82
81
<% } -%>
83
- <% for (const collection of collections) { %> /**
82
+ <% for (const [index, collection] of Object .entries( collections) ) { %> /**
84
83
* @typedef {Document & {
85
84
<% for (const attribute of collection.attributes) { -%>
86
85
* <% - strict ? toCamelCase(attribute.key) : attribute.key %> : <% - getType(attribute, collections) %> ;
87
86
<% } -%>
88
87
* }} <% - toPascalCase(collection.name) %>
89
88
*/
90
-
89
+ <% if (index < collections.length - 1 ) { %>
90
+ <% } -%>
91
91
<% } %> `;
92
92
}
93
93
You can’t perform that action at this time.
0 commit comments