Effect CommunityEC
Effect Community2y ago
18 replies
Patrick Roza

Issue with TaggedClass constructor when passing additional properties

      if (additionalProps !== undefined) {
        props = { ...additionalProps, ...props }
      }

this is a problem for TaggedClass, when the user passes another _tag in the constructor (no compile error)

e.g:
    new Printed({
      ..._.state,
      processing: null,
      at: new Date(),
      byUserId: userId,
      printerId,
      context
    })
while state: LabelCreated | Printed
Was this page helpful?