
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
- ATTRIBUTE NOT SHOWING DELETE
Hi, I'm trying to delete an attribute in my collection but it won't delete, It's not even showing the delete when I click on the hamburger icon, Its showing onl...
- Email Verification Error
I am trying to make a registration flow for the next.js using node-appwriter sdk as SSR. I am trying to add email verification but isn't working giving some err...
- Encountering More factors are required w...
I am encoutering the more factors error even though I am providing proper mfa code in the workflow. The following happens: 1) User provides email adress 2) Use...
