Skip to content

Commit

Permalink
Update the type for redis.del() (#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
stouf authored and gantoine committed Jan 12, 2018
1 parent 86cef88 commit 93bfa57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion definitions/npm/redis_v2.x.x/flow_v0.34.x-/redis_v2.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ declare module "redis" {
hdel: (topic: string, key: string) => number;
get: (key: string, (Error | null, string | null) => void) => void;
set: (key: string, value: string, cb?: (error: Error | null) => void) => void;
del: (...keys: Array<string>) => void;
del: (keys: Array<string>, cb?: (Error | null) => void) => void;
mget: (keys: Array<string>, (Error | null, Array<string | null>) => void) => void;
mset: (keysAndValues: Array<string>, cb?: (Error | null) => void) => void;
rpoplpush: (source: string, destination: string) => string | void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ client.set('some-key');
// $ExpectError
client.set('some-key', { foo: 'bar' });

client.del(['key1', 'key2', 'key3']);
client.del(['key1', 'key2', 'key3'], (error) => {
if (error) console.error(error);
});

client.hmset("some-key", { key1: "value1" }, err =>
console.log("hmset error:", err)
);
Expand Down

0 comments on commit 93bfa57

Please sign in to comment.