这是F#中抽象成员的典型声明:
abstract member createEmployee : string -> string -> Employee
您定义参数类型,但不定义其名称。如果没有名称,在实现接口(interface)时如何分辨每个参数是什么?换句话说,您如何知道该接口(interface)期望实现为1-还是2-?
1- member this.createEmployee firstName lastName = ...
2- member this.createEmployee lastName firstName = ...
我是从错误的 Angular 看问题的(习惯于C#)吗?
最佳答案
关于什么:
abstract member createEmployee : firstName:string -> lastName:string -> Employee
?