Skip to content

Commit

Permalink
Enhance the type of redisClient.lpush() (#1709)
Browse files Browse the repository at this point in the history
The second argument is expected to be a string (it used to be any).
  • Loading branch information
stouf authored and gantoine committed Jan 9, 2018
1 parent 090e654 commit cd1469e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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 @@ -3,7 +3,7 @@ declare module "redis" {
declare class RedisClient extends events$EventEmitter mixins RedisClientPromisified {
hmset: (key: string, map: any, callback: (?Error) => void) => void;
rpush: (key: string, value: string, callback: (?Error) => void) => void;
lpush: (key: string, value: any, callback?: (?Error, number) => void) => void;
lpush: (key: string, value: string, callback?: (?Error, number) => void) => void;
lrem: (
topic: string,
cursor: number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ client.lpush("key", "value", (err, newLength) => {
console.log(`New length: ${newLength}`);
});
client.lpush("key", "value");
// $EXpectError
// $ExpectError
client.lpush("key");
// $EXpectError
// $ExpectError
client.lpush("key", { foo: 'bar' });

0 comments on commit cd1469e

Please sign in to comment.