Skip to content

Commit f145d71

Browse files
committed
fix type ClientConnectOptions
1 parent 5559235 commit f145d71

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

types/client.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Dispatcher from './dispatcher'
33
import buildConnector from './connector'
44
import TClientStats from './client-stats'
55

6-
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
6+
type ClientConnectOptions<TOpaque = null> = Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin'>
77

88
/**
99
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
@@ -20,12 +20,12 @@ export class Client extends Dispatcher {
2020
readonly stats: TClientStats
2121

2222
// Override dispatcher APIs.
23-
override connect (
24-
options: ClientConnectOptions
25-
): Promise<Dispatcher.ConnectData>
26-
override connect (
27-
options: ClientConnectOptions,
28-
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
23+
override connect<TOpaque = null> (
24+
options: ClientConnectOptions<TOpaque>
25+
): Promise<Dispatcher.ConnectData<TOpaque>>
26+
override connect<TOpaque = null> (
27+
options: ClientConnectOptions<TOpaque>,
28+
callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void
2929
): void
3030
}
3131

0 commit comments

Comments
 (0)