Skip to content

validator specific exports #40

@m1212e

Description

@m1212e

Hi, would it be possible to allow package exports for validator specific imports? In my case I would like to allow a user of my library to pass a validator schema no matter which kind (valibot, zod, typebox) but they might not have installed the other ones. When importing import type { TypeBox } from "@sinclair/typemap" I get an error that valibot cannot be found. Would it be possible to export specific validator modules from the packagejson so I can use dynamic imports with try/catch to check dynamically which one is available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions