draft: true
doesn’t prevent TypeScript from expecting required fields
#12578
Labels
draft: true
doesn’t prevent TypeScript from expecting required fields
#12578
Describe the Bug
According to the documentation,
draft: true
prevents mandatory fields from having to be defined, but TypeScript requires them anyway:https://payloadcms.com/docs/versions/drafts#updating-or-creating-drafts
Link to the code that reproduces this issue
https://github.com/payloadcms/payload
Reproduction Steps
test/_community/collections/Posts/index.ts
, addversions: { drafts: true }
to the collection andrequired: true
to the "content" field.pnpm dev
to generate the types.payload.create
of the file:test/_community/config.ts
. This error appears even if you adddraft: true
as a property topayload.create
:Which area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: