Closed p6l-richard closed 1 month ago
Really good idea
Let's add this along side of verify
though in order to not break anyone's code
wdyt?
Also instead of returning any
, we can make it generic to allow for better typing
@p6l-richard, like @chronark said it would be better to add this as an addition to verify
. If you're open to making these adjustments, everything seems to be in order.
Changes
verify
method toconstructEvent
(similar to stripe's api)Context
This is useful to provide storngly-typed objects back to the caller. E.g. with tRPC (which validates with zod), I can pass that to an input I've defined previously:
NB: The types here are missing, but it would make for a nicer DX imho