Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: investigate if double inference is required #41

Open
simonireilly opened this issue Feb 5, 2022 · 0 comments
Open

refactor: investigate if double inference is required #41

simonireilly opened this issue Feb 5, 2022 · 0 comments

Comments

@simonireilly
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant