Documentation / zerotal / testing / FactoryPayload
Type Alias: FactoryPayload<T>
FactoryPayload<
T> =Omit<InsertPayload<T>,FKKeys<T> & keyofInsertPayload<T>> &Partial<Pick<InsertPayload<T>,FKKeys<T> & keyofInsertPayload<T>>>
Defined in: packages/testing/src/factory.ts:28
The return type expected from a factory definition callback.
Like InsertPayload.for(model) or explicit overrides,
so the factory definition does not need to supply them.
Non-FK required fields (title, body, name, email, …) remain required, giving the definition callback full type safety without false positives.
Type Parameters
T
T extends BaseModel