Build error with typescript 2.4.0
Closed this issue · 1 comments
quentin-tardivon commented
Several classes incorrectly implements interface:
Interface: Message Emitter
Classes: MuteCore, SyncMessageService, CollaboratorsService
Conaclos commented
Hi :)
Issue
There are type mismatches between the declared types of onMsgToSendTo
and onMsgToSendRandomly
in MessageEmitter
, and their defined types in the corrresponding implementations. More precisely, SendRandomlyMessage
is not (structurally) conforms to SendToMessage
.
Prior to TS 2.4, generics were weakly checked. That's explain why this error was not caught yet.
Possible fix
Property names suggest that the erroneous declarations are in the interface.