Skip to content

Commit

Permalink
fix: pnpm failure because of missing ajv type
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Oct 26, 2021
1 parent 36b301c commit 41d265c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Ajv } from 'ajv'
import { FastifyPluginAsync, FastifyRequest } from 'fastify'
import FastifyPlugin from 'fastify-plugin'
import { Fields, File, Files, IncomingForm, Options } from 'formidable'
Expand Down Expand Up @@ -139,7 +138,8 @@ const plugin: FastifyPluginAsync<FastifyFormidableOptions> = async function (fas
}
}

export const ajvBinaryFormat = function (ajv: Ajv): void {
// we treat ajv to any because we do not want to deal with the ajv@6 and ajv@8 typing problem
export const ajvBinaryFormat = function (ajv: any): void {
ajv.addFormat('binary', {
type: 'string',
validate (o: unknown) {
Expand Down

0 comments on commit 41d265c

Please sign in to comment.