HEXPIRE.d.ts 988 B

1234567891011121314151617181920212223
  1. import { RedisCommandArgument } from '.';
  2. /**
  3. * @readonly
  4. * @enum {number}
  5. */
  6. export declare const HASH_EXPIRATION: {
  7. /** @property {number} */
  8. /** The field does not exist */
  9. readonly FIELD_NOT_EXISTS: -2;
  10. /** @property {number} */
  11. /** Specified NX | XX | GT | LT condition not met */
  12. readonly CONDITION_NOT_MET: 0;
  13. /** @property {number} */
  14. /** Expiration time was set or updated */
  15. readonly UPDATED: 1;
  16. /** @property {number} */
  17. /** Field deleted because the specified expiration time is in the past */
  18. readonly DELETED: 2;
  19. };
  20. export type HashExpiration = typeof HASH_EXPIRATION[keyof typeof HASH_EXPIRATION];
  21. export declare const FIRST_KEY_INDEX = 1;
  22. export declare function transformArguments(key: RedisCommandArgument, fields: RedisCommandArgument | Array<RedisCommandArgument>, seconds: number, mode?: 'NX' | 'XX' | 'GT' | 'LT'): import(".").RedisCommandArguments;
  23. export declare function transformReply(): Array<HashExpiration>;