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
- Fulltext index creation fails due to Inn...
I'm running a self-hosted Appwrite 1.8.1 instance and encountering an issue when creating fulltext indexes on a collection. **The Problem:** Fulltext index cre...
- Unable To Use Root Domain In Appwrite
Since Appwrite Manages my DNS Completely, I tried Pointing the Root Domain (**getmyself.app**) to Github Pages, It failed So I tried Using Appwrite Sites, also ...
- Report: fetch failed
https://github.com/appwrite/appwrite/issues/10989 please assign this issue to me