Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

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

@nazarhussain

Description

@nazarhussain

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAddressing a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions