Rank 2: Process
I am trying to get my types sorted out with the custom collection schema. I am trying to add my custom properties to Models.Document like this:
interface Picture extends Models.Document { user_id: string, name: string, pic_id: string, an: number, descriere: string}And trying to use it like this:
db.listDocuments(..).documents.map((a: Picture) => {});Except, it's not compatible: ts Argument of type '(a: Picture) => { user_id: string; name: string; pic_id: string; an: number; descriere: string; }' is not assignable to parameter of type '(value: Document, index: number, array: Document[]) => { user_id: string; name: string; pic_id: string; an: number; descriere: string; }'.ts(2345)
What would be the solution?