diff --git a/types/node-zookeeper-client/index.d.ts b/types/node-zookeeper-client/index.d.ts index 0e095cd822..1dcc8eca2a 100644 --- a/types/node-zookeeper-client/index.d.ts +++ b/types/node-zookeeper-client/index.d.ts @@ -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; diff --git a/types/node-zookeeper-client/node-zookeeper-client-tests.ts b/types/node-zookeeper-client/node-zookeeper-client-tests.ts index 554077e5af..ec8727ae4e 100644 --- a/types/node-zookeeper-client/node-zookeeper-client-tests.ts +++ b/types/node-zookeeper-client/node-zookeeper-client-tests.ts @@ -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); }