@envelop/core 2.4.0-alpha-3936561.0 → 2.4.0-alpha-0969daf.0
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/index.js +0 -1
- package/index.mjs +0 -1
- package/package.json +1 -1
- package/utils.d.ts +7 -4
package/index.js
CHANGED
|
@@ -299,7 +299,6 @@ function errorAsyncIterator(source, onError) {
|
|
|
299
299
|
};
|
|
300
300
|
return stream;
|
|
301
301
|
}
|
|
302
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
303
302
|
function getInMemoryLRUCache({ max = 1000, onDelete = () => { }, } = {}) {
|
|
304
303
|
let storage = {};
|
|
305
304
|
let keys = [];
|
package/index.mjs
CHANGED
|
@@ -295,7 +295,6 @@ function errorAsyncIterator(source, onError) {
|
|
|
295
295
|
};
|
|
296
296
|
return stream;
|
|
297
297
|
}
|
|
298
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
299
298
|
function getInMemoryLRUCache({ max = 1000, onDelete = () => { }, } = {}) {
|
|
300
299
|
let storage = {};
|
|
301
300
|
let keys = [];
|
package/package.json
CHANGED
package/utils.d.ts
CHANGED
|
@@ -31,12 +31,15 @@ export declare function isAsyncIterable<TType>(maybeAsyncIterable: unknown): may
|
|
|
31
31
|
export declare function handleStreamOrSingleExecutionResult<ContextType = DefaultContext>(payload: OnExecuteDoneEventPayload<ContextType>, fn: OnExecuteDoneHookResultOnNextHook<ContextType>): void | OnExecuteDoneHookResult<ContextType>;
|
|
32
32
|
export declare function finalAsyncIterator<TInput>(source: AsyncIterable<TInput>, onFinal: () => void): AsyncGenerator<TInput>;
|
|
33
33
|
export declare function errorAsyncIterator<TInput>(source: AsyncIterable<TInput>, onError: (err: unknown) => void): AsyncGenerator<TInput>;
|
|
34
|
-
export
|
|
35
|
-
max?: number;
|
|
36
|
-
onDelete?: (key: string, value: V) => void;
|
|
37
|
-
}): {
|
|
34
|
+
export interface BasicCache<V> {
|
|
38
35
|
get(key: string): V | undefined;
|
|
39
36
|
set(key: string, value: V): void;
|
|
40
37
|
delete(key: string): void;
|
|
38
|
+
clear?: () => void;
|
|
39
|
+
}
|
|
40
|
+
export declare function getInMemoryLRUCache<V>({ max, onDelete, }?: {
|
|
41
|
+
max?: number;
|
|
42
|
+
onDelete?: (key: string, value: V) => void;
|
|
43
|
+
}): BasicCache<V> & {
|
|
41
44
|
clear(): void;
|
|
42
45
|
};
|