Type alias To<N, E>

To<N, E>: ((sync: Sync, node: N) => E)

Type Parameters

Type Parameters

  • N extends Entity

  • E extends common.EntityProps

Type declaration

    • (sync: Sync, node: N): E
    • A function type to map fir's representation of branches in an iModel, like elements and models, to its corresponding iTwin 'props' type. For example, toElement maps an Element to an ElementProps. fir makes sure that each of these functions starts with the prefix to for visibility.

      Importantly, these functions may have side effects and write their dependencies to the iModel. For example, toSource will insert its repository if it exists because it must know its ID to construct its 'props' type.

      Connector authors can define their own function of this type to take control of the synchronizer.

      Parameters

      Returns E

Generated using TypeDoc