bun-types-no-globals 1.2.21-canary.20250814T140633 → 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/bun.d.ts CHANGED
@@ -596,6 +596,23 @@ declare module "bun" {
596
596
  options?: StringWidthOptions,
597
597
  ): number;
598
598
 
599
+ /**
600
+ * Remove ANSI escape codes from a string.
601
+ *
602
+ * @category Utilities
603
+ *
604
+ * @param input The string to remove ANSI escape codes from.
605
+ * @returns The string with ANSI escape codes removed.
606
+ *
607
+ * @example
608
+ * ```ts
609
+ * import { stripANSI } from "bun";
610
+ *
611
+ * console.log(stripANSI("\u001b[31mhello\u001b[39m")); // "hello"
612
+ * ```
613
+ */
614
+ function stripANSI(input: string): string;
615
+
599
616
  /**
600
617
  * TOML related APIs
601
618
  */
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bun-types-no-globals",
3
- "version": "1.2.21-canary.20250814T140633",
3
+ "version": "1.2.21-canary.20250816T140611",
4
4
  "main": "./generator/index.ts",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "MIT",