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
TL;DR
Type the return of `databases.listDocuments` using TypeScript by creating a custom type union with `Models.Document`. Use the code snippet provided in the message to achieve this.
Would you like to try using this tool for further assistance: https://discord.com/channels/564160730845151244/837593904952901634/1292063850371350560