Ensuring type constraints on parametric types

#1

Let’s assume I am defining this parametric type
extendable entity type AssetRiskTrainer<T, M, I> extends MapReduce<T, int, Dataset, AssetRiskModel> type key ‘PMRT’ {

T represents the src type of my map reduce job. How do I ensure that T has to extend Asset type or that T has to mix MetricEvaluatable for example?

0 Likes

#2

Similar question here: Specify requirements of parametric type params? (unanswered so far) [EDIT: answered!]

0 Likes