API Reference: CreateWithModel
The builder returned by Forger.createWith<T>(). It carries a pre-generated instance of T and applies pinned property values to it.
with
Executes expr against the generated instance. Use exactly one property assignment per call and chain calls for multiple properties:
Nested paths are allowed and count as a single assignment:
The expression runs immediately, so the values on the right side are evaluated at with() time, not at result() time.
result
Returns the instance after all with() calls. Call it after every with() — later assignments are not applied. Like Forger.create, the return type includes undefined for the no-transformer scenario.
Interaction with generation
The transformer inspects the with() expressions of the whole chain and excludes pinned properties from generation for the root type instance — the assigned value is the only one the property will hold. Everything else about the instance stays generated, including same-named properties in nested objects. Details: createWith.