diff --git a/types/index.d.ts b/types/index.d.ts index f9ad85fb1..c87c86950 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -32,12 +32,14 @@ export interface KafkaConfig { logCreator?: logCreator } -export type ISocketFactory = ( +export interface ISocketFactoryArgs { host: string, port: number, ssl: tls.ConnectionOptions, onConnect: () => void -) => net.Socket +} + +export type ISocketFactory = (args: ISocketFactoryArgs) => net.Socket export type SASLMechanism = 'plain' | 'scram-sha-256' | 'scram-sha-512' | 'aws' | 'oauthbearer'