18 and 19 are type definitions. There is no need to construct such a type in your test code. You only need to pass a correct parameter when instance alarm (and the type of the parameter is the definition of 18 and 19. According to this The definition requires passing parameters).
getAlarmConfig and alarmOutput are the definitions of two types, which can be understood as function signatures, not specific implementations. What you need to do in lines 18 and 19 should be the implementation of these two types, As long as they comply Signature can be implemented in any way,
18 and 19 are type definitions. There is no need to construct such a type in your test code. You only need to pass a correct parameter when instance
alarm
(and the type of the parameter is the definition of 18 and 19. According to this The definition requires passing parameters).getAlarmConfig
andalarmOutput
are the definitions of two types, which can be understood as function signatures, not specific implementations.What you need to do in lines 18 and 19 should be the implementation of these two types,
As long as they comply Signature can be implemented in any way,
For example
PS: It is best not to name the implementation object the same as the type definition