nestjs
nestjs copied to clipboard
feat(rabbitmq): add generic type to publish for simple type checking
This change provides a way to have basic type checking done when publishing messages.
By default it still uses the generic type any. public publish<T = any>(
so no changes are needed for existing code.
Simple example of the benefit at development stage.