You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm not sure if this issue belongs here or to ajv package.
I get a ts error Argument of type 'import("node_modules/ajv/dist/ajv").default' is not assignable to parameter of type 'import("node_modules/ajv-formats/node_modules/ajv/dist/core").default'. when passing ajv object to ajv-formats:
import Ajv from "ajv";
import addAjvFormats from "ajv-formats";
const ajv = new Ajv();
addAjvFormats(ajv);
The first one is used in ajv default export type definition and the second one - in ajv-formats type definitions. Could you plz fix the typings, or better to address this issue to ajv package as they hold 2 divergent definitions?
The text was updated successfully, but these errors were encountered:
Geloosa
changed the title
Type error running the ajv@8.11.2
Type error running with ajv@8.11.2
Nov 22, 2022
Hey, I'm not sure if this issue belongs here or to
ajv
package.I get a ts error
Argument of type 'import("node_modules/ajv/dist/ajv").default' is not assignable to parameter of type 'import("node_modules/ajv-formats/node_modules/ajv/dist/core").default'.
when passingajv
object toajv-formats
:This is because
ajv
package holds 2 different definitions forAjv
class:https://github.com/ajv-validator/ajv/blob/master/lib/core.ts#L275
https://github.com/ajv-validator/ajv/blob/master/lib/ajv.ts#L11
The first one is used in
ajv
default export type definition and the second one - inajv-formats
type definitions. Could you plz fix the typings, or better to address this issue toajv
package as they hold 2 divergent definitions?The text was updated successfully, but these errors were encountered: