Like what we’re doing? Star us on GitHub!

Exposing group and block types when generating types

sam
last month
1

I want to write some generic mappings that maps from payload's types to props for my frontend React components. Blocks and groups aren't exposed at the top level, so I'm having to manually pick them out by unpacking arrays and extracting specific blocks.



Is it possible to expose these when generating types? Or is there a simpler way for me to define these types based on the generated typings?

Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More