Merge pull request #21520 from Tapad/fix-zookeeper-client-exception-type

[node-zookeeper-client] fix zookeeper client exception constructor type
This commit is contained in:
Nathan Shively-Sanders
2017-11-15 09:11:09 -08:00
committed by GitHub
2 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -172,7 +172,13 @@ export class Exception {
code: number;
name: string;
path?: string;
constructor(code: number, name: string, path?: string);
// tslint:disable-next-line ban-types
constructor(code: number, name: string, path: string, ctor: Function);
// tslint:disable-next-line ban-types
constructor(code: number, name: string, ctor: Function);
toString(): string;
getCode(): number;
getName(): string;
@@ -257,6 +257,6 @@ const client = zookeeper.createClient(
}
{
new zookeeper.Exception(zookeeper.Exception.NO_NODE, 'test');
new zookeeper.Exception(zookeeper.Exception.NO_NODE, 'test', '/test');
new zookeeper.Exception(zookeeper.Exception.NO_NODE, 'test', zookeeper.Exception);
new zookeeper.Exception(zookeeper.Exception.NO_NODE, 'test', '/test', zookeeper.Exception);
}