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 {
6262 }
6363
6464 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 `/**
7066 * @typedef {import('${this._getAppwriteDependency()}').Models.Document} Document
7167 */
7268
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+
7372<% for (const collection of collections) { -%>
7473<% for (const attribute of collection.attributes) { -%>
7574<% if (attribute.format === ' enum' ) { -%>
@@ -80,14 +79,15 @@ class JavaScript extends LanguageMeta {
8079<% } -%>
8180<% } -%>
8281<% } -%>
83- <% for (const collection of collections) { %> /**
82+ <% for (const [index, collection] of Object .entries( collections) ) { %> /**
8483 * @typedef {Document & {
8584<% for (const attribute of collection.attributes) { -%>
8685 * <% - strict ? toCamelCase(attribute.key) : attribute.key %> : <% - getType(attribute, collections) %> ;
8786<% } -%>
8887 * }} <% - toPascalCase(collection.name) %>
8988 */
90-
89+ <% if (index < collections.length - 1 ) { %>
90+ <% } -%>
9191<% } %> `;
9292 }
9393
You can’t perform that action at this time.
0 commit comments