
Hello,
I was wondering the best way to strongly type using typescript the return type of listDocuments
etc. Is the below correct or is there a better way to do this/generate types?
type Test = {
name: string
} & Models.Document
const result = await databases.listDocuments<Test>()
result.documents[0].name
Thank you

How to type the documents that come back using typescript

There's currently no support for this but there's this tool if thats of any help (haven't tried personally though) - https://discord.com/channels/564160730845151244/837593904952901634/1292063850371350560
Recommended threads
- [SOLVED] Running into error 400 when lin...
I cant find the create collection under database, all I see is create tables and this is affecting my react app
- Issue with Education Plan Activation
I recently registered for the Appwrite Education Program through your official link: https://appwrite.io/education. While the registration process seemed to com...
- Migrating from one self-hosted instance ...
I am trying to migrate from an older VM running Appwrite 1.6 to a new VM with the latest version. On my new VM running Appwrite 1.7.4 I am going to migrations...
