Skip to content

Commit

Permalink
Merge branch 'DefinitelyTyped:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lasabahebwa authored Oct 13, 2023
2 parents ea415c8 + 4d22de9 commit c1bfa8b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
12 changes: 6 additions & 6 deletions types/node-zookeeper-client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ export const Permission: {
};

export interface Stat {
czxid: number;
mzxid: number;
ctime: number;
mtime: number;
czxid: Buffer;
mzxid: Buffer;
ctime: Buffer;
mtime: Buffer;
version: number;
cversion: number;
aversion: number;
ephemeralOwner: number;
ephemeralOwner: Buffer;
dataLength: number;
numChildren: number;
pzxid: number;
pzxid: Buffer;
}

export class State {
Expand Down
22 changes: 22 additions & 0 deletions types/node-zookeeper-client/node-zookeeper-client-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,28 @@ const client = zookeeper.createClient(

if (stat) {
console.log("Node exists.");
// $ExpectType Buffer
stat.czxid;
// $ExpectType Buffer
stat.mzxid;
// $ExpectType Buffer
stat.ctime;
// $ExpectType Buffer
stat.mtime;
// $ExpectType number
stat.version;
// $ExpectType number
stat.cversion;
// $ExpectType number
stat.aversion;
// $ExpectType Buffer
stat.ephemeralOwner;
// $ExpectType number
stat.dataLength;
// $ExpectType number
stat.numChildren;
// $ExpectType Buffer
stat.pzxid;
} else {
console.log("Node does not exist.");
}
Expand Down

0 comments on commit c1bfa8b

Please sign in to comment.