• A hook event that fires when Cards are dealt from a deck to other hands. dealCards

    Parameters

    • origin: Cards

      The origin Cards document

    • destinations: Cards[]

      An array of destination Cards documents

    • context: {
          action: string;
          toCreate: object[][];
          fromUpdate: object[];
          fromDelete: object[];
      }

      Additional context which describes the operation

      • action: string

        The action name being performed, i.e. "deal", "pass"

      • toCreate: object[][]

        An array of Card creation operations to be performed in each destination Cards document

      • fromUpdate: object[]

        Card update operations to be performed in the origin Cards document

      • fromDelete: object[]

        Card deletion operations to be performed in the origin Cards document

    Returns void