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.
Focused Scope
Improve concrete TypeScript ergonomics where the current API can be made more precise.
Proposed v1
FactoryOutput<F>.InferFactorySchema<S>only if it can be implemented without broad compiler-style promises.extend()typing so extension functions can return only added fields when possible.expect-typecoverage for literal preservation, explicit discriminated unions, and composition not degrading toany.Out of Scope
The original issue mixed useful DX work with goals TypeScript cannot provide at runtime. This version keeps the work measurable.