Skip to content

"Type instantiation is excessively deep" with ArkType 2.1.28 #497

@yamcodes

Description

@yamcodes

ArkType 2.1.28 has introduced a change that actually breaks some of our type work in arkenv, which specifically fails the typecheck of the @arkenv/vite-plugin:

We can solve this by typing EnvSchema better, or, in the interim, use "as any" in the createEnv call within the @arkenv/vite-plugin.

The above is more of a workaround than an idea solution (because any sux) but it solves the issue at hand without creating any issues for consumers. It's just less ideal to work with internally. Do note that even ArkType recommends casting from time to time.

Maybe we can find something better than any or, again, maybe we can find a better type for EnvSchema. (Use Standard Schema directly?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    @arkenv/vite-pluginIssues or Pull Requests involving the Vite plugin for ArkEnvarkenvChanges to the `arkenv` npm package.bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions