mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
make node_redis inherits from EventEmitter
This commit is contained in:
parent
bd9a1922e4
commit
b5f6b3d5b1
@ -51,7 +51,9 @@ client.exists(str, numCallback);
|
||||
|
||||
client.publish(str, value);
|
||||
client.subscribe(str);
|
||||
|
||||
client.on(str, messageHandler);
|
||||
client.once(str, messageHandler);
|
||||
|
||||
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
|
||||
|
||||
@ -61,4 +63,4 @@ client.get(args, resCallback);
|
||||
client.set(args);
|
||||
client.set(args, resCallback);
|
||||
|
||||
client.incr(str, resCallback);
|
||||
client.incr(str, resCallback);
|
||||
|
||||
5
redis/redis.d.ts
vendored
5
redis/redis.d.ts
vendored
@ -5,6 +5,8 @@
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/redis.d.ts
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "redis" {
|
||||
export function createClient(port_arg: number, host_arg?: string, options?: ClientOpts): RedisClient;
|
||||
export function createClient(unix_socket: string, options?: ClientOpts): RedisClient;
|
||||
@ -43,7 +45,7 @@ declare module "redis" {
|
||||
auth_pass?: boolean;
|
||||
}
|
||||
|
||||
interface RedisClient {
|
||||
interface RedisClient extends NodeJS.EventEmitter {
|
||||
// event: connect
|
||||
// event: error
|
||||
// event: message
|
||||
@ -76,7 +78,6 @@ declare module "redis" {
|
||||
|
||||
publish(channel: string, value: any): void;
|
||||
subscribe(channel: string): void;
|
||||
on(channel: string, handler: MessageHandler): void;
|
||||
|
||||
/*
|
||||
commands = set_union([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user