You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
move "all-in-one" to root folder
This commit is contained in:
22
index.ts
Normal file
22
index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { createClient as _createClient } from '@redis/client';
|
||||
import { RedisScripts } from '@redis/client/dist/lib/commands';
|
||||
import { RedisClientOptions, RedisClientType } from '@redis/client/dist/lib/client';
|
||||
import RedisJSON from '@redis/json';
|
||||
import RediSearch from '@redis/search';
|
||||
|
||||
export * from '@redis/search';
|
||||
|
||||
const modules = {
|
||||
json: RedisJSON,
|
||||
ft: RediSearch
|
||||
};
|
||||
|
||||
export function createClient<S extends RedisScripts = Record<string, never>>(
|
||||
options?: Omit<RedisClientOptions<never, S>, 'modules'>
|
||||
): RedisClientType<typeof modules, S> {
|
||||
return _createClient({
|
||||
...options,
|
||||
modules
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user