mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add: Node-redis-pubsub definitions
This commit is contained in:
parent
84a2cfa837
commit
fab040385d
28
types/node-redis-pubsub/index.d.ts
vendored
Normal file
28
types/node-redis-pubsub/index.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
// Type definitions for node-redis-pubsub 3.0.0
|
||||
// Project: https://github.com/louischatriot/node-redis-pubsub#readme
|
||||
// Definitions by: Rene Keijzer <https://github.com/renekeijzer>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import * as redis from 'redis';
|
||||
|
||||
declare function NRP(options:object) : NRP.NodeRedisPubSub;
|
||||
declare namespace NRP {
|
||||
function initClient(options:object) : NRP.NodeRedisPubSub;
|
||||
|
||||
class NodeRedisPubSub {
|
||||
constructor(options : object);
|
||||
getRedisClient(any:void): redis.RedisClient;
|
||||
on(channel:string, handler:Function, callback?:Function):Function;
|
||||
subscribe(channel:string, handler:Function, callback?:Function):Function;
|
||||
emit(channel:string, message:string) : any;
|
||||
publish(channel:string, message:string) : any;
|
||||
quit(any:void):void;
|
||||
end(any:void):void;
|
||||
}
|
||||
}
|
||||
|
||||
export = NRP;
|
||||
14
types/node-redis-pubsub/package.json
Normal file
14
types/node-redis-pubsub/package.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "node-redis-pubsub",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/redis": "^2.8.6"
|
||||
}
|
||||
}
|
||||
22
types/node-redis-pubsub/tsconfig.json
Normal file
22
types/node-redis-pubsub/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user