Open alecorsino opened 5 years ago
When using WebSocketSubjectConfig for webSocket observable it would be sensible that can accept 2 different generic types instead of one.
Is your feature request related to a problem? Please describe. interface WebSocketSubjectConfig \<T> { ... serializer?: (value: T) => WebSocketMessage; deserializer?: (e: MessageEvent) => T; ... }
Describe the solution you'd like interface WebSocketSubjectConfig<S,D> { ... serializer?: (value: S) => WebSocketMessage; deserializer?: (e: MessageEvent) => D; ... }
Describe alternatives you've considered I need to have an extra layer and common type for request response messages which are completely different in my case and maintaining a common type when they are completely different it make no sense.
Totally agree. It would be a great feature.
Feature Request
When using WebSocketSubjectConfig for webSocket observable it would be sensible that can accept 2 different generic types instead of one.
Is your feature request related to a problem? Please describe. interface WebSocketSubjectConfig \<T> { ... serializer?: (value: T) => WebSocketMessage; deserializer?: (e: MessageEvent) => T; ... }
Describe the solution you'd like interface WebSocketSubjectConfig<S,D> { ... serializer?: (value: S) => WebSocketMessage; deserializer?: (e: MessageEvent) => D; ... }
Describe alternatives you've considered I need to have an extra layer and common type for request response messages which are completely different in my case and maintaining a common type when they are completely different it make no sense.