trpc-panel icon indicating copy to clipboard operation
trpc-panel copied to clipboard

Zod Record/Map Input Doesn't Appear

Open WilliamWelsh opened this issue 2 years ago • 2 comments
trafficstars

z.record() and z.map() don't show up in the panel

Example input

  .input(
    z.object({
      walletAddress: z.string().transform((val) => val.toLowerCase()),
      page: z.number(),
      filters: z.record(z.string(), z.string()),
    })
  )

The filters don't show up. I'm on 1.2.3

WilliamWelsh avatar Dec 27 '22 22:12 WilliamWelsh

Record and Map are just not supported yet - it's possible to support them though, and is on the roadmap.

You can see a full list of supported zod types at the bottom of the readme - https://github.com/iway1/trpc-panel#supported-zod-types.

Feel free to open a PR if you want to contribute 😊 If not, I'll probably add it myself this weekend or so, adding the rest of the zod types at the top of my priorities for this project.

Even just adding a "input type not supported" error message could be pretty valuable in the interim

iway1 avatar Dec 27 '22 23:12 iway1

Alright, thanks. We are loving tRPC.panel() :D

WilliamWelsh avatar Dec 27 '22 23:12 WilliamWelsh