
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
- general_unknown server error for upsertD...
Hey all, i updated the node-sdk to 17.1.0 and tried the upsertDocument function added, but that gives me the error: ```js "name": "AppwriteException", "code": 5...
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
- PR Review and Issue Assign?
I am not familiar with how things work here. I know that Issue have to be assigned before solving problem, It is for not wasting contributors time but I like t...
