Skip to content

Commit e921db5

Browse files
committed
chore: update type generation in js/ts to use Models.Row
1 parent 8e8e396 commit e921db5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class JavaScript extends LanguageMeta {
6666

6767
getTemplate() {
6868
return `/**
69-
* @typedef {import('${this._getAppwriteDependency()}').Models.Document} Document
69+
* @typedef {import('${this._getAppwriteDependency()}').Models.Row} Row
7070
*/
7171

7272
// This file is auto-generated by the Appwrite CLI.
@@ -83,7 +83,7 @@ class JavaScript extends LanguageMeta {
8383
<% } -%>
8484
<% } -%>
8585
<% for (const [index, collection] of Object.entries(collections)) { %>/**
86-
* @typedef {Document & {
86+
* @typedef {Row & {
8787
<% for (const attribute of collection.attributes) { -%>
8888
* <%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- getType(attribute, collections) %>;
8989
<% } -%>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export enum <%- toPascalCase(attribute.key) %> {
8888
<% } -%>
8989
<% } -%>
9090
<% for (const [index, collection] of Object.entries(collections)) { -%>
91-
export type <%- toPascalCase(collection.name) %> = Models.Document & {
91+
export type <%- toPascalCase(collection.name) %> = Models.Row & {
9292
<% for (const attribute of collection.attributes) { -%>
9393
<%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- getType(attribute, collections) %>;
9494
<% } -%>

0 commit comments

Comments
 (0)