From c08eccf29c9a866455d848a0200165bb7f93cc61 Mon Sep 17 00:00:00 2001 From: Jesse Zhang Date: Tue, 7 Nov 2017 16:03:13 -0500 Subject: [PATCH] [node-zookeeper-client] fix exception path type --- types/node-zookeeper-client/index.d.ts | 4 ++-- types/node-zookeeper-client/node-zookeeper-client-tests.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) 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'); +}