Eomm / fastify-raw-body

Request raw body
MIT License
44 stars 10 forks source link

Missing parameters in secureJson.parse #51

Closed theolpmodesto closed 1 year ago

theolpmodesto commented 1 year ago

I noticed that the function secureJson.parse has 3 parameters, but it only utilizes 2. After updating from Fastify 3v to v4, I encountered some errors.

Screenshot 2023-08-01 at 21 31 12 Screenshot 2023-08-01 at 21 29 00
Eomm commented 1 year ago

It has 2 optional args and the first one that is mandatory: https://github.com/fastify/secure-json-parse#sjsonparsetext-reviver-options

Here is the method overload:

https://github.com/fastify/secure-json-parse/blob/master/types/index.d.ts#L56

Could you add a Minimal, Reproducible Example?

Without it, we are unable to help you.