Is there an existing issue for this?
Current behavior

Minimum reproduction code
https://github.com/edeesis/kafkajs-nest
Steps to reproduce
Attempt to re-use the KafkaJS KafkaConfig typing in the Nest MicroserviceOptions. You'll get a typescript error as screenshotted above.
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { KafkaConfig } from 'kafkajs';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const config: KafkaConfig = {
clientId: 'client-id',
brokers: process.env.KAFKA_BROKERS.split(','),
};
await app.connectMicroservice<MicroserviceOptions>({
transport: Transport.KAFKA,
options: {
client: config,
},
});
await app.listen(3000);
}
Expected behavior
Typings should match.
I'm also curious why there's a need for separate typings, rather than using the typings exported from kafkajs.
Package
Other package
No response
NestJS version
10.x
Packages versions
{
"dependencies": {
"@nestjs/common": "^10.3.0",
"@nestjs/config": "^3.1.1",
"@nestjs/core": "^10.3.0",,
"@nestjs/microservices": "^10.3.0",
"kafkajs": "^2.2.4",
}
}
Change was done in kafkajs 2.2.1
Node.js version
20.x
In which operating systems have you tested?
Other
No response
Is there an existing issue for this?
Current behavior
Minimum reproduction code
https://github.com/edeesis/kafkajs-nest
Steps to reproduce
Attempt to re-use the KafkaJS KafkaConfig typing in the Nest MicroserviceOptions. You'll get a typescript error as screenshotted above.
Expected behavior
Typings should match.
I'm also curious why there's a need for separate typings, rather than using the typings exported from kafkajs.
Package
@nestjs/common@nestjs/core@nestjs/microservices@nestjs/platform-express@nestjs/platform-fastify@nestjs/platform-socket.io@nestjs/platform-ws@nestjs/testing@nestjs/websocketsOther package
No response
NestJS version
10.x
Packages versions
{ "dependencies": { "@nestjs/common": "^10.3.0", "@nestjs/config": "^3.1.1", "@nestjs/core": "^10.3.0",, "@nestjs/microservices": "^10.3.0", "kafkajs": "^2.2.4", } }Change was done in kafkajs 2.2.1
Node.js version
20.x
In which operating systems have you tested?
Other
No response