compeller icon indicating copy to clipboard operation
compeller copied to clipboard

refactor: investigate if double inference is required

Open simonireilly opened this issue 4 years ago • 0 comments

Currently the type for ajv is inferred, from the type of the object.

This object is inferred from the JSONSchema type. It looks as below:

Ajv.compile<JSONSchemaType<FromSchema<typeof schema>>>(schema)

This double inference might not be necessary, since the schema type is already know.

Investigate if:

Ajv.compile(schema)

Returns the expected type from validation, without supplying a generic

simonireilly avatar Feb 05 '22 08:02 simonireilly