JSON Field return type

default discord avatar
yhn5790
3 months ago
3

Generated types gives the following as the type for JSON fields.


| {
        [k: string]: unknown;
      }
    | unknown[]
    | string
    | number
    | boolean
    | null;


How do I tell it to use my interface or type?



Help 🥺



@jarrod69420 @jacobsfletch Sorry for tagging. Any suggestions?

  • discord user avatar
    jmikrut
    Payload Team
    3 months ago

    right now it is not possible to "override" a specific field's generated type, but it would be pretty easy to build a new feature to do so

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.