-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Context
Inline schema autocompletion (without the type() helper) has regressed twice now:
- Schema autocompletion no longer works without type helper (0.7.6 → 0.7.7) #522 — first reported in v0.7.7, fixed in v0.7.8 via Fix editor autocomplete for
arkenv/createEnvfunction #531 - Autocompletion still broken in ^0.9.2 (same issue as #522) #790 — regressed again in v0.9.x
Both times the root cause was changes to the createEnv overload signatures in create-env.ts that broke TypeScript's ability to provide string literal suggestions for ArkType DSL values.
Task
Add automated regression tests that catch autocompletion breakage. Options to explore:
@arktype/attestor similar type-level testing to assert thatEnvSchema<T>resolves correctly for inline objects- dtslint / tsd / expect-type style assertions that verify the parameter type narrows to ArkType's string DSL union
- A simple type-level test that ensures
arkenv({ KEY: "..." })infers the same types asarkenv(type({ KEY: "..." }))— if the types diverge, autocompletion likely broke - Vitest type testing
The goal is to prevent this from silently regressing a third time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels