I have fastify 2.14
installed. I am following the documentation to use custom validation library.
Here's my code:
import fastify from 'fastify';
const app = fastify({});
app.setValidatorCompiler(({schema}) => data => schema.validate(data)); // setValidatorCompiler is not a function
console.log(app.setValidatorCompiler) // undefined
export default app;
I also tried passing it in the route options and typescript doesn't recognize it as a field.
also setSerializerCompiler
is not a function.