@eleven-am/faker
    Preparing search index...

    Interface DependentOptions<ParentType>

    interface DependentOptions<ParentType = unknown> {
        condition: (parent: ParentType) => boolean;
    }

    Type Parameters

    • ParentType = unknown
    Index

    Properties

    Properties

    condition: (parent: ParentType) => boolean

    Condition function to check against the partially built parent object. IMPORTANT: You MUST perform type checks or assertions on 'parent' inside this function before accessing its properties, especially if ParentType is inferred or complex. Example: condition: (parent) => typeof (parent as YourType).someProp === 'number' && (parent as YourType).someProp > 10

    Type declaration

      • (parent: ParentType): boolean
      • Parameters

        • parent: ParentType

          The partially built parent object (type ParentType, defaults to unknown).

        Returns boolean

        true if the dependent field should be generated, false otherwise.