@formant/realtime-sdk 0.0.8 → 0.0.9
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/dist/common/LruCache.d.ts +7 -9
- package/dist/common/PromiseLruCache.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/model/IJsonString.d.ts +3 -0
- package/dist/model/rtcStreamTypes.d.ts +2 -1
- package/dist/protos/api/signaling/v1/signaling_pb.js +1 -1
- package/dist/rtc-client/RtcClient.d.ts +1 -2
- package/dist/rtc-client/models/IRtcStreamPayload.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import * as BaseLruCache from "lru-cache";
|
|
2
|
-
|
|
3
|
-
export interface ICacheOptions<V> extends Options<string, V> {
|
|
2
|
+
export declare type CacheOptions<V> = BaseLruCache.Options<string, V> & {
|
|
4
3
|
fastStringify?: boolean;
|
|
5
|
-
}
|
|
4
|
+
};
|
|
6
5
|
export declare class LruCache<K, V> {
|
|
7
6
|
protected cache: BaseLruCache<string, V>;
|
|
8
7
|
protected stringify: (_: K) => string;
|
|
9
|
-
constructor(options
|
|
10
|
-
set(key: K, value: V,
|
|
8
|
+
constructor(options: CacheOptions<V>);
|
|
9
|
+
set(key: K, value: V, ttl?: number): void;
|
|
11
10
|
get(key: K): V | undefined;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
prune(): void;
|
|
11
|
+
delete(key: K): void;
|
|
12
|
+
size(): number;
|
|
13
|
+
clear(): void;
|
|
16
14
|
forEach(callback: (value: V) => void): void;
|
|
17
15
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { CacheOptions, LruCache } from "./LruCache";
|
|
2
|
+
export declare type PromiseCacheOptions<V> = CacheOptions<Promise<V>> & {
|
|
3
3
|
expireRejectedPromiseValues?: boolean;
|
|
4
4
|
rejectedPromiseValueTtl?: number;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
export declare class PromiseLruCache<K, V> extends LruCache<K, Promise<V>> {
|
|
7
7
|
protected expireRejectedPromiseValues: boolean;
|
|
8
8
|
protected rejectedPromiseValueTtl: number;
|
|
9
|
-
constructor(options
|
|
10
|
-
set(key: K, value: Promise<V>,
|
|
9
|
+
constructor(options: PromiseCacheOptions<V>);
|
|
10
|
+
set(key: K, value: Promise<V>, ttl?: number): void;
|
|
11
11
|
}
|