Skip to content

Feature: Type Ergonomics Improvements #67

@Goldziher

Description

@Goldziher

Focused Scope

Improve concrete TypeScript ergonomics where the current API can be made more precise.

Proposed v1

  • Export FactoryOutput<F>.
  • Consider InferFactorySchema<S> only if it can be implemented without broad compiler-style promises.
  • Improve extend() typing so extension functions can return only added fields when possible.
  • Add expect-type coverage for literal preservation, explicit discriminated unions, and composition not degrading to any.

Out of Scope

  • Runtime validation from TypeScript types.
  • Custom compiler error messages.
  • IntelliSense guarantees.
  • Object-literal constructor examples that do not match the current API.

The original issue mixed useful DX work with goals TypeScript cannot provide at runtime. This version keeps the work measurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions