@pgtyped/wire
Advanced tools
Comparing version 0.5.0 to 0.5.3
@@ -19,5 +19,5 @@ /// <reference types="node" /> | ||
constructor(); | ||
connect(passedOptions?: { | ||
port?: number; | ||
host?: string; | ||
connect(passedOptions: { | ||
port: number; | ||
host: string; | ||
}): Promise<void>; | ||
@@ -24,0 +24,0 @@ send<Params extends object>(message: IClientMessage<Params>, params: Params): Promise<void>; |
@@ -44,8 +44,3 @@ "use strict"; | ||
}); | ||
const defaultOptions = { | ||
port: 5432, | ||
host: 'localhost', | ||
}; | ||
const options = Object.assign({}, defaultOptions, passedOptions || {}); | ||
this.socket.connect(options); | ||
this.socket.connect(passedOptions); | ||
}); | ||
@@ -52,0 +47,0 @@ } |
{ | ||
"name": "@pgtyped/wire", | ||
"version": "0.5.0", | ||
"version": "0.5.3", | ||
"main": "lib/index.js", | ||
@@ -26,3 +26,3 @@ "types": "lib/index.d.ts", | ||
}, | ||
"gitHead": "402a85b9371411c50715e8198ded259ae464e956" | ||
"gitHead": "bee929d9f3a08f81580967b1eec40699e3bd029e" | ||
} |
@@ -36,6 +36,3 @@ import * as net from 'net'; | ||
} | ||
public connect(passedOptions?: { | ||
port?: number; | ||
host?: string; | ||
}): Promise<void> { | ||
public connect(passedOptions: { port: number; host: string }): Promise<void> { | ||
return new Promise((resolve) => { | ||
@@ -46,8 +43,3 @@ this.socket.on('connect', () => { | ||
}); | ||
const defaultOptions = { | ||
port: 5432, | ||
host: 'localhost', | ||
}; | ||
const options = Object.assign({}, defaultOptions, passedOptions || {}); | ||
this.socket.connect(options); | ||
this.socket.connect(passedOptions); | ||
}); | ||
@@ -54,0 +46,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91842
2519