Select a generic type based on a condition

前端 未结 0 1984
死守一世寂寞
死守一世寂寞 2020-12-10 02:51

I cannot figure out how to select a generic type dynamically based on a given condition. For example:

let someCondition: Bool = ...
var model = someCondition          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题