Skip to content

Clarify TypeScript is recommended, not required#506

Merged
yamcodes merged 8 commits intomainfrom
copilot/fix-contradictory-typescript-requirement
Dec 8, 2025
Merged

Clarify TypeScript is recommended, not required#506
yamcodes merged 8 commits intomainfrom
copilot/fix-contradictory-typescript-requirement

Conversation

Copy link
Contributor

Copilot AI commented Dec 8, 2025

The README stated TypeScript ≥5.1 as a hard requirement, while the examples documentation claimed "ArkEnv does not require TypeScript." ArkEnv works at runtime without TypeScript, but type safety requires it.

Changes

  • README Requirements: Restructured to separate runtime requirements (Node/Bun/Vite versions) from TypeScript, now under "TypeScript (Recommended)" subsection
  • Examples documentation: Updated wording to clarify TypeScript is recommended for type safety rather than stating it's not required
  • basic-js example: Completed previously empty index.js to demonstrate JavaScript usage and added to examples table

Trade-off

// Works in plain JavaScript - runtime validation only
const env = arkenv({
  PORT: "number.port",
  NODE_ENV: "'development' | 'production' | 'test'",
});
// ✓ Runtime validation works
// ✗ No editor autocomplete
// ✗ No compile-time type checking

TypeScript adds compile-time checking and exact type inference but isn't required for runtime validation to work.

Original prompt

This section details on the original issue you should resolve

<issue_title>Contradictory TypeScript requirement</issue_title>
<issue_description>In our docs, we clearly say TypeScript is not required for ArkEnv to work: https://arkenv.js.org/docs/arkenv/examples#examples.

However, TypeScript is the first item in our requirements section: https://github.com/yamcodes/arkenv#requirements

For at least one of these, we should either change the wording or remove it, and fix this contradiction.

Does ArkEnv require TypeScript, or not? Is TypeScript mandatory, or just recommended?
Should we even address non-TypeScript projects?</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Summary by CodeRabbit

  • Documentation

    • Updated ecosystem compatibility requirements (Node.js, Bun, Vite support)
    • Added TypeScript setup guidance and configuration recommendations
    • Clarified TypeScript vs. plain JavaScript usage options and trade-offs
  • Examples

    • Added plain JavaScript example demonstrating environment variable parsing

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

⚠️ No Changeset found

Latest commit: f6551e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Dec 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Dec 8, 2025 7:54pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Documentation updates clarifying that TypeScript is recommended but not required for ArkEnv, along with ecosystem compatibility details and a new plain JavaScript example demonstrating runtime environment parsing.

Changes

Cohort / File(s) Change Summary
Documentation Updates
examples/README.md, packages/arkenv/README.md
Updated messaging to clarify TypeScript is recommended but not mandatory. Added ecosystem compatibility block (Node.js LTS/Current, Bun 1.3.2, Vite). Introduced TypeScript setup section with module resolution guidance. Added trade-off notes between TypeScript (build-time checking, autocomplete) and plain JavaScript.
New Example
examples/basic-js/index.js
New plain JavaScript example demonstrating ArkEnv schema definition with HOST, PORT, and NODE_ENV variables, configuration parsing, and default export.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Verify documentation clarity and consistency of TypeScript requirement messaging across files
  • Confirm example code is syntactically correct and demonstrates intended functionality
  • Ensure links and references in documentation are properly formatted

Possibly related PRs

Poem

🐰 TypeScript's neat, but JS works too,
No mandatory deps to constrain you!
From plain JavaScript to types so bright,
ArkEnv supports both—choose what's right.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main change: clarifying that TypeScript is recommended, not required, which aligns with the PR's core objective of resolving the contradiction in documentation.
Linked Issues check ✅ Passed The PR fully addresses all coding-related requirements from issue #473 by restructuring documentation to clarify TypeScript is recommended for type safety but not required for runtime validation, adding a basic-js example demonstrating plain JavaScript usage, and updating documentation to eliminate the contradiction between requirements and examples sections.
Out of Scope Changes check ✅ Passed All changes (README restructuring, examples documentation updates, and basic-js example) directly address the linked issue #473 objectives of clarifying TypeScript status and providing non-TypeScript project examples; no out-of-scope changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits December 8, 2025 13:07
Co-authored-by: yamcodes <2014360+yamcodes@users.noreply.github.com>
Co-authored-by: yamcodes <2014360+yamcodes@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix contradictory TypeScript requirement in documentation Clarify TypeScript is recommended, not required Dec 8, 2025
Copilot AI requested a review from yamcodes December 8, 2025 13:13
@yamcodes yamcodes marked this pull request as ready for review December 8, 2025 19:27
@github-actions github-actions bot added docs Improvements or additions to documentation arkenv Changes to the `arkenv` npm package. example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory) labels Dec 8, 2025
@yamcodes
Copy link
Owner

yamcodes commented Dec 8, 2025

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/arkenv@506
npm i https://pkg.pr.new/@arkenv/bun-plugin@506
npm i https://pkg.pr.new/@arkenv/vite-plugin@506

commit: b4d1622

@arkenv-bot
Copy link
Contributor

arkenv-bot bot commented Dec 8, 2025

📦 Bundle Size Report

Package Size Limit Diff Status
arkenv 725 B 2 kB 0.0%

All size limits passed!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/arkenv/README.md (1)

114-114: Consider mentioning the basic-js example for JavaScript users.

Since this PR introduces the basic-js example to demonstrate plain JavaScript usage without TypeScript, consider mentioning it alongside the basic example link for Node.js users who prefer JavaScript.

Example:

-ArkEnv is tested on [**Node.js LTS** and **Current**](https://github.com/yamcodes/arkenv/tree/main/examples/basic), [**Bun 1.3.2**](https://github.com/yamcodes/arkenv/tree/main/examples/with-bun), and [**Vite** from **2.9.18** to **7.x**](https://github.com/yamcodes/arkenv/tree/main/examples/with-vite-react-ts). Older versions may work but are not officially supported.
+ArkEnv is tested on [**Node.js LTS** and **Current**](https://github.com/yamcodes/arkenv/tree/main/examples/basic) ([plain JS example](https://github.com/yamcodes/arkenv/tree/main/examples/basic-js)), [**Bun 1.3.2**](https://github.com/yamcodes/arkenv/tree/main/examples/with-bun), and [**Vite** from **2.9.18** to **7.x**](https://github.com/yamcodes/arkenv/tree/main/examples/with-vite-react-ts). Older versions may work but are not officially supported.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e16ea75 and c785958.

📒 Files selected for processing (3)
  • examples/README.md (1 hunks)
  • examples/basic-js/index.js (1 hunks)
  • packages/arkenv/README.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/README.md

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Document environment requirements in README files

Files:

  • examples/README.md
  • packages/arkenv/README.md
**/*.{ts,tsx,json,md}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use Biome for linting and formatting instead of ESLint and Prettier

Files:

  • examples/README.md
  • packages/arkenv/README.md
🧠 Learnings (25)
📓 Common learnings
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 132
File: packages/arkenv/README.md:13-14
Timestamp: 2025-09-09T17:37:19.650Z
Learning: For yamcodes/arkenv project: Runtime support documentation should link to specific examples: Node.js (examples/basic), Bun (examples/with-bun), Vite (examples/with-vite-react-ts).
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Keep environment variable schemas readable and TypeScript-like using ArkType syntax
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's built-in types (e.g., `string.host`, `number.port`) where possible in environment schemas
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: ArkType validates environment variables at runtime and TypeScript types are inferred from the schema definition
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use `ArkEnvError` for environment variable errors, not generic errors
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use `ArkEnvError` for environment variable validation errors
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use ArkType's `type()` function to define schemas in environment variable definitions
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's type inference for TypeScript types instead of manual type definitions
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Environment schema definitions should use built-in validators, ArkType string literals, and support default values in the schema pattern
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Convert ArkType validation errors to `ArkEnvError` for user-friendly error messages that include variable name and expected type
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Include examples in JSDoc comments when helpful for public APIs

Applied to files:

  • examples/README.md
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to examples/**/*.{ts,tsx} : Add examples in the `examples/` directory for new functionality, demonstrating real-world usage patterns

Applied to files:

  • examples/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-09-09T17:37:19.650Z
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 132
File: packages/arkenv/README.md:13-14
Timestamp: 2025-09-09T17:37:19.650Z
Learning: For yamcodes/arkenv project: Runtime support documentation should link to specific examples: Node.js (examples/basic), Bun (examples/with-bun), Vite (examples/with-vite-react-ts).

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Keep environment variable schemas readable and TypeScript-like using ArkType syntax

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's type inference for TypeScript types instead of manual type definitions

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use union types for enums in ArkType schemas (e.g., `"'dev' | 'prod'"`) instead of separate enum definitions

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Leverage ArkType's built-in types (e.g., `string.host`, `number.port`) where possible in environment schemas

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to examples/**/*.{ts,tsx} : Ensure examples demonstrate secure default practices

Applied to files:

  • examples/README.md
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use `ArkEnvError` for environment variable errors, not generic errors

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use PascalCase for type names (e.g., `ArkEnvError`)

Applied to files:

  • examples/README.md
📚 Learning: 2025-11-24T16:04:00.957Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/coding-guidelines.mdc:0-0
Timestamp: 2025-11-24T16:04:00.957Z
Learning: Applies to **/*.{ts,tsx} : Use `ArkEnvError` for environment variable validation errors

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Use ArkType's `type()` function to define schemas in environment variable definitions

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/**/*.ts : Convert ArkType validation errors to `ArkEnvError` for user-friendly error messages that include variable name and expected type

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use descriptive environment variable names that indicate purpose and format

Applied to files:

  • examples/README.md
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to packages/arkenv/src/**/*.ts : Main library implementation should be in `src/create-env.ts`, built-in validators in `src/types.ts`, error handling in `src/errors.ts`, and utilities in `src/utils.ts`

Applied to files:

  • examples/README.md
  • packages/arkenv/README.md
📚 Learning: 2025-09-10T19:35:18.179Z
Learnt from: yamcodes
Repo: yamcodes/arkenv PR: 136
File: .changeset/vast-bananas-win.md:2-3
Timestamp: 2025-09-10T19:35:18.179Z
Learning: The arkenv package is currently in v0.x.x (pre-1.0) development phase, where breaking changes are acceptable in minor version bumps according to semantic versioning conventions.

Applied to files:

  • packages/arkenv/README.md
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: Applies to packages/arkenv/scope.ts : Define custom types in `scope.ts` using ArkType's scoped type system for reusability across schemas

Applied to files:

  • packages/arkenv/README.md
📚 Learning: 2025-11-24T16:03:45.295Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/arktype.mdc:0-0
Timestamp: 2025-11-24T16:03:45.295Z
Learning: ArkType validates environment variables at runtime and TypeScript types are inferred from the schema definition

Applied to files:

  • packages/arkenv/README.md
  • examples/basic-js/index.js
📚 Learning: 2025-11-24T16:04:36.939Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .cursor/rules/test-patterns.mdc:0-0
Timestamp: 2025-11-24T16:04:36.939Z
Learning: Achieve coverage goals: environment variable parsing and validation, type checking and error handling, default value handling, custom type validation, plugin integration with Vite, and real project build testing using examples as fixtures

Applied to files:

  • packages/arkenv/README.md
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Use `createEnv(schema)` as the main function for validated environment objects, available as the default export

Applied to files:

  • examples/basic-js/index.js
📚 Learning: 2025-11-29T08:57:24.056Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: examples/with-bun-react/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2025-11-29T08:57:24.056Z
Learning: Applies to examples/with-bun-react/**/*.{ts,tsx,js,jsx} : Bun automatically loads .env, so don't use dotenv

Applied to files:

  • examples/basic-js/index.js
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.test.{ts,tsx} : Test edge cases including invalid and missing environment variable values

Applied to files:

  • examples/basic-js/index.js
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.{ts,tsx} : Environment schema definitions should use built-in validators, ArkType string literals, and support default values in the schema pattern

Applied to files:

  • examples/basic-js/index.js
📚 Learning: 2025-11-29T22:11:39.931Z
Learnt from: CR
Repo: yamcodes/arkenv PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T22:11:39.931Z
Learning: Applies to **/*.test.{ts,tsx} : Mock `process.env` in tests for different scenarios and save/restore original env in `beforeEach`/`afterEach` hooks

Applied to files:

  • examples/basic-js/index.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test-e2e (e2e)
  • GitHub Check: test-e2e (a11y)
🔇 Additional comments (6)
packages/arkenv/README.md (3)

116-119: LGTM! Clear distinction between runtime support and TypeScript benefits.

The section successfully clarifies that TypeScript is recommended rather than required, while explaining the trade-offs clearly.


125-126: LGTM! Clear explanation of TypeScript trade-offs.

The note effectively communicates what users gain with TypeScript (build-time checking, autocomplete) while confirming runtime validation works without it.


123-123: No changes needed. The TypeScript >= 5.1 requirement is accurate and aligns with ArkType's documented minimum requirement.

examples/basic-js/index.js (3)

9-16: LGTM! Excellent demonstration of runtime validation in plain JavaScript.

The comments and usage clearly demonstrate the key trade-off: runtime validation works without TypeScript, which aligns perfectly with the PR objectives.


17-17: LGTM! Standard export pattern.

The default export allows other modules to consume the validated environment variables, consistent with TypeScript examples.


3-7: No issues found. The schema definition correctly uses ArkType's default value syntax with string literals, which works for both TypeScript and plain JavaScript runtime validation. The syntax "'development' | 'production' | 'test' = 'development'" is the proper way to define union types with defaults in ArkType schemas.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@yamcodes yamcodes merged commit 8bec049 into main Dec 8, 2025
17 of 18 checks passed
@yamcodes yamcodes deleted the copilot/fix-contradictory-typescript-requirement branch December 8, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arkenv Changes to the `arkenv` npm package. docs Improvements or additions to documentation example Issues or Pull Requests concerning at least one ArkEnv example. (Found in the `examples/` directory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contradictory TypeScript requirement

2 participants