UNPKG

927 BTypeScriptView Raw
1import IORedis, { RedisOptions } from "ioredis";
2import { ElementProxy } from "yaml-scene/src/elements/ElementProxy";
3import { IElement } from "yaml-scene/src/elements/IElement";
4import { Functional } from 'yaml-scene/src/tags/model/Functional';
5export declare type Cmd = {
6 title?: string;
7 cmd: string[] | string | Functional;
8 args?: string[];
9 var?: any;
10};
11export declare class Redis implements IElement {
12 proxy: ElementProxy<this>;
13 $$: IElement;
14 $: this;
15 pretty?: boolean;
16 title?: string;
17 uri: string;
18 commands: (Cmd | string)[];
19 opts?: RedisOptions;
20 redis: IORedis;
21 init(props: {
22 uri: string;
23 title?: string;
24 }): void;
25 prepare(): Promise<void>;
26 exec(): Promise<void>;
27 protected runCommand(command: Cmd): Promise<any>;
28 dispose(): Promise<void>;
29 protected getCommand(cmd: string | string[] | Functional): string[] | Functional;
30}