bun-types-no-globals 1.2.21-canary.20250815T140623 → 1.2.21-canary.20250816T140611
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/redis.d.ts +44 -0
- package/package.json +1 -1
package/lib/redis.d.ts
CHANGED
|
@@ -574,6 +574,50 @@ declare module "bun" {
|
|
|
574
574
|
*/
|
|
575
575
|
getex(key: RedisClient.KeyLike): Promise<string | null>;
|
|
576
576
|
|
|
577
|
+
/**
|
|
578
|
+
* Get the value of a key and set its expiration in seconds
|
|
579
|
+
* @param key The key to get
|
|
580
|
+
* @param ex Set the specified expire time, in seconds
|
|
581
|
+
* @param seconds The number of seconds until expiration
|
|
582
|
+
* @returns Promise that resolves with the value of the key, or null if the key doesn't exist
|
|
583
|
+
*/
|
|
584
|
+
getex(key: RedisClient.KeyLike, ex: "EX", seconds: number): Promise<string | null>;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Get the value of a key and set its expiration in milliseconds
|
|
588
|
+
* @param key The key to get
|
|
589
|
+
* @param px Set the specified expire time, in milliseconds
|
|
590
|
+
* @param milliseconds The number of milliseconds until expiration
|
|
591
|
+
* @returns Promise that resolves with the value of the key, or null if the key doesn't exist
|
|
592
|
+
*/
|
|
593
|
+
getex(key: RedisClient.KeyLike, px: "PX", milliseconds: number): Promise<string | null>;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Get the value of a key and set its expiration at a specific Unix timestamp in seconds
|
|
597
|
+
* @param key The key to get
|
|
598
|
+
* @param exat Set the specified Unix time at which the key will expire, in seconds
|
|
599
|
+
* @param timestampSeconds The Unix timestamp in seconds
|
|
600
|
+
* @returns Promise that resolves with the value of the key, or null if the key doesn't exist
|
|
601
|
+
*/
|
|
602
|
+
getex(key: RedisClient.KeyLike, exat: "EXAT", timestampSeconds: number): Promise<string | null>;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Get the value of a key and set its expiration at a specific Unix timestamp in milliseconds
|
|
606
|
+
* @param key The key to get
|
|
607
|
+
* @param pxat Set the specified Unix time at which the key will expire, in milliseconds
|
|
608
|
+
* @param timestampMilliseconds The Unix timestamp in milliseconds
|
|
609
|
+
* @returns Promise that resolves with the value of the key, or null if the key doesn't exist
|
|
610
|
+
*/
|
|
611
|
+
getex(key: RedisClient.KeyLike, pxat: "PXAT", timestampMilliseconds: number): Promise<string | null>;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Get the value of a key and remove its expiration
|
|
615
|
+
* @param key The key to get
|
|
616
|
+
* @param persist Remove the expiration from the key
|
|
617
|
+
* @returns Promise that resolves with the value of the key, or null if the key doesn't exist
|
|
618
|
+
*/
|
|
619
|
+
getex(key: RedisClient.KeyLike, persist: "PERSIST"): Promise<string | null>;
|
|
620
|
+
|
|
577
621
|
/**
|
|
578
622
|
* Ping the server
|
|
579
623
|
* @returns Promise that resolves with "PONG" if the server is reachable, or throws an error if the server is not reachable
|