Typings for new connect method

Is there any typings for the new TCP connect method yet? I'm using @cloudflare/workers-types@next and I can't seem to find any typings for it. Adding the following to types.d.ts works:
declare module "cloudflare:sockets" {
export function connect(address: SocketAddress | string, options?: SocketOptions): Socket
}
declare module "cloudflare:sockets" {
export function connect(address: SocketAddress | string, options?: SocketOptions): Socket
}
2 Replies
DaniFoldi
DaniFoldi2y ago
It's coming very soon, there's a PR open that will include them - look for the next release!
DJtheRedstoner
DJtheRedstonerOP2y ago
thanks ❤️

Did you find this page helpful?