Goldziher / Goldziher/interface-forge

Feature: Factory Presets and Traits

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted onlydust-wave
Dominant language
TypeScript
Stars
102
Forks
9
PR merge metrics
No merged PRs in 30d

Description

## Focused Scope

Add a small presets/traits API for named partial overrides and ordered composition.

## Proposed v1

- Register named presets on a factory.
- Apply one or more presets during build/batch.
- Later presets override earlier presets.
- Explicit build overrides win over presets.
- Keep the implementation sync-first; async behavior should only be added if it naturally fits `buildAsync()`.

## Out of Scope

- State machines or lifecycle transitions.
- Discriminated-union specialization.
- ORM-style association presets.
- A broad variants framework.

Existing `extend()`, `compose()`, kwargs, and hooks already cover many variant use cases; this issue should focus only on the missing named-preset ergonomics.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.