Skip to content

Export typebox Parse or something of the sort #1123

Open
@vladkrasn

Description

@vladkrasn

What is the problem this feature would solve?

On startup of the app, I want to validate variables pulled from .env and export them as one env object.

Something like what they're doing with Zod here.

On startup, I want application to throw an error if something's missing, and I want to reuse those parsed variables not only inside of Elysia instance, but also in other parts of the application (for example, for db connection).

What is the feature you are proposing to solve the problem?

Since Elysia already contains Typebox inside of itself, it would be really nice if we could use their Value.Parse method without needing to install additional packages.

What alternatives have you considered?

The alternative is to add another validation package to the project, or Typebox itself. But Elysia already has Typebox inside!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions