argumentParsers.d.ts 810 B

1234567891011121314
  1. import { CommandParameter } from "../types";
  2. /**
  3. * Parses a command parameter as seconds and converts to milliseconds.
  4. * @param arg - The command parameter representing seconds
  5. * @returns The value in milliseconds, 0 if value is <= 0, or undefined if parsing fails
  6. */
  7. export declare const parseSecondsArgument: (arg: CommandParameter | undefined) => number | undefined;
  8. /**
  9. * Parses the BLOCK option from Redis command arguments (e.g., XREAD, XREADGROUP).
  10. * @param args - Array of command parameters to search for the BLOCK option
  11. * @returns The block duration in milliseconds, 0 if duration is <= 0,
  12. * null if BLOCK option is not found, or undefined if BLOCK is found but duration is invalid
  13. */
  14. export declare const parseBlockOption: (args: CommandParameter[]) => number | null | undefined;