• Utility function that can be used to map an arbitrary data object to a model.

    Type Parameters

    • D extends object
    • T extends IKosDataModel

    Parameters

    • data: D

      the input data for the mapping function

    • model: T

      the target model to map the data to

    • mapper: KosDataMapperUtils<D, T> = defaultMapper

      a mapping function that takes the input data and the target model and returns a partial of the target model. The results will be applied to the model.

    Returns void