How to implement a type safe, phantom types based builder in typescript?

后端 未结 0 483
孤街浪徒
孤街浪徒 2020-11-27 04:32

The idea is to allow a call to the .build() method only upon having all the mandatory parameters filled. So the constructor should be taught to do some validation.

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