forked from redis/ioredis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
37 lines (32 loc) · 1.03 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
exports = module.exports = require("./redis").default;
export { default } from "./redis";
export { default as Cluster } from "./cluster";
export { default as Command } from "./command";
export { default as ScanStream } from "./ScanStream";
export { default as Pipeline } from "./pipeline";
export { default as AbstractConnector } from "./connectors/AbstractConnector";
export {
default as SentinelConnector,
SentinelIterator,
} from "./connectors/SentinelConnector";
// Type Exports
export { ISentinelAddress } from "./connectors/SentinelConnector";
export { IRedisOptions } from "./redis/RedisOptions";
// No TS typings
export const ReplyError = require("redis-errors").ReplyError;
const PromiseContainer = require("./promiseContainer");
Object.defineProperty(exports, "Promise", {
get() {
return PromiseContainer.get();
},
set(lib) {
PromiseContainer.set(lib);
},
});
export function print(err: Error | null, reply?: any) {
if (err) {
console.log("Error: " + err);
} else {
console.log("Reply: " + reply);
}
}