File: types.d.ts

package info (click to toggle)
node-postgres 8.16.3%2B~cs35.24.27-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,788 kB
  • sloc: javascript: 15,879; python: 79; makefile: 57
file content (25 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
declare module 'cloudflare:sockets' {
  export class Socket {
    public readonly readable: any
    public readonly writable: any
    public readonly closed: Promise<void>
    public close(): Promise<void>
    public startTls(options: TlsOptions): Socket
  }

  export type TlsOptions = {
    expectedServerHostname?: string
  }

  export type SocketAddress = {
    hostname: string
    port: number
  }

  export type SocketOptions = {
    secureTransport?: 'off' | 'on' | 'starttls'
    allowHalfOpen?: boolean
  }

  export function connect(address: string | SocketAddress, options?: SocketOptions): Socket
}