Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

JSON Field return type

default discord avatar
yhn57902 years ago
1

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 🥺



@281120856527077378

@808734492645785600

Sorry for tagging. Any suggestions?

  • discord user avatar
    jmikrut
    2 years 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

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.