You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generic type for Documents can be enhanced. I propose the following change to DocumentSchema:
// schema must include at least an `id`exporttypeDocumentSchema={id: string;[name: string]: any}// if property can be undefined also make it nullabletypeCreatableDocumentSchema<TDocumentextendsDocumentSchema>={[nameinkeyofTDocument]: undefinedextendsExtract<TDocument[name],undefined>
? TDocument[name]|null
: TDocument[name]}// if property can be undefined also make it nullable, and make everything else possibly undefined as well// except `id`typeUpdatableDocumentSchema<TDocumentextendsDocumentSchema>=Pick<TDocument,'id'>&{[nameinkeyofOmit<TDocument,'id'>]?: undefinedextendsExtract<TDocument[name],undefined>
? TDocument[name]|null
: TDocument[name]}
I propose to extend ImportResponseFail to include the type of the document:
Generic type for
Documents
can be enhanced. I propose the following change toDocumentSchema
:I propose to extend
ImportResponseFail
to include the type of the document:With these modifications we can now be more specific for instance in
import
:I'd also like to propose a type generator based on collection
fields
schema if this gets approved later.The text was updated successfully, but these errors were encountered: