diff --git a/types/node-zookeeper-client/index.d.ts b/types/node-zookeeper-client/index.d.ts index 8a63177f83..0e095cd822 100644 --- a/types/node-zookeeper-client/index.d.ts +++ b/types/node-zookeeper-client/index.d.ts @@ -171,8 +171,8 @@ export class Exception { code: number; name: string; - path: number; - constructor(code: number, name: string, path: number); + path?: string; + constructor(code: number, name: string, path?: string); 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 90f19642cc..554077e5af 100644 --- a/types/node-zookeeper-client/node-zookeeper-client-tests.ts +++ b/types/node-zookeeper-client/node-zookeeper-client-tests.ts @@ -255,3 +255,8 @@ const client = zookeeper.createClient( { new zookeeper.Event(zookeeper.Event.NODE_CREATED, 'test', '/test'); } + +{ + new zookeeper.Exception(zookeeper.Exception.NO_NODE, 'test'); + new zookeeper.Exception(zookeeper.Exception.NO_NODE, 'test', '/test'); +}