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

Web3-Validator build error: Type '"type"' does not satisfy the constraint #5712

Closed
1 task done
nazarhussain opened this issue Dec 25, 2022 · 0 comments · Fixed by #5713
Closed
1 task done

Web3-Validator build error: Type '"type"' does not satisfy the constraint #5712

nazarhussain opened this issue Dec 25, 2022 · 0 comments · Fixed by #5713
Labels
Bug Addressing a bug

Comments

@nazarhussain
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When using web3-validator package in other project which have a dependency to ajv turns into following build errors.

$ tsc
../../node_modules/web3-validator/dist/types.d.ts:18:68 - error TS2344: Type '"type"' does not satisfy the constraint 'number | unique symbol | "length" | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "replace" | "search" | "slice" | ... 33 more ... | "trimRight"'.

18 export declare type JsonSchema = Optional<JSONSchemaType<unknown>, "type"> & {

Expected Behavior

The build should be fine.

Steps to Reproduce

  • Add web3-validator as dependency to a TS project.
  • Add the ajv as direct dependency to that project.
  • Try building the project.

Web3.js Version

4.0.1-alpha.2

Environment

No response

Anything Else?

No response

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

Successfully merging a pull request may close this issue.

1 participant