From c49a53466c6f7cd5a5763f66d2452545082ac4ca Mon Sep 17 00:00:00 2001 From: hriss95 Date: Fri, 9 Sep 2016 15:45:18 +0100 Subject: [PATCH] Node.d.ts: Update definitions for module "dgram" (#11143) --- node/node.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/node.d.ts b/node/node.d.ts index f2a05aecc892fc..ff9612e9bb07df 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -1423,14 +1423,14 @@ declare module "dgram" { } interface SocketOptions { - type: string; + type: "udp4" | "udp6"; reuseAddr?: boolean; } export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - interface Socket extends events.EventEmitter { + export interface Socket extends events.EventEmitter { send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void; send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; bind(port?: number, address?: string, callback?: () => void): void;