@neovici/cosmoz-utils 5.21.0 → 5.23.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/dist/array.d.ts CHANGED
@@ -3,4 +3,4 @@ export declare function array(arr: null): [];
3
3
  export declare function array<T>(arr?: T | T[]): T[];
4
4
  export declare function array<T>(arr: Iterable<T>): T[];
5
5
  export declare function array<T = unknown>(arr: T): T[];
6
- export declare const without: (exclude: unknown, predicate?: <T>(obj: T) => T) => (list: unknown) => unknown[];
6
+ export declare const without: <E, L>(exclude: E[], predicate?: <T extends E | L>(value: T) => unknown) => (list: L[]) => L[];
package/dist/array.js CHANGED
@@ -17,7 +17,6 @@ export function array(arr) {
17
17
  }
18
18
  return [arr];
19
19
  }
20
- // TODO: Improve definition
21
20
  export const without = (exclude, predicate = identity) => (list) => {
22
21
  const excludes = array(exclude).map(predicate);
23
22
  return array(list).filter((value) => !excludes.includes(predicate(value)));
package/dist/promise.d.ts CHANGED
@@ -6,6 +6,6 @@ export declare class ManagedPromise<T> extends Promise<T> {
6
6
  export declare const timeout$: (ms?: number) => Promise<unknown>;
7
7
  type Predicate<T extends Event> = (e: T) => boolean;
8
8
  export declare const event$: <E extends Event, P extends Predicate<E>>(target: EventTarget, type: string, predicate?: P | undefined, timeout?: number) => Promise<unknown>;
9
- export declare const limit$: <T extends [], P>(fn: (...args: T) => PromiseLike<P>, limit: number) => (...args: T) => Promise<P>;
10
- export declare const debounce$: <T extends [], P>(fn: (...args: T) => PromiseLike<P>, ms?: number) => (...args: T) => Promise<unknown>;
9
+ export declare const limit$: <T extends unknown[], P>(fn: (...args: T) => PromiseLike<P>, limit: number) => (...args: T) => Promise<P>;
10
+ export declare const debounce$: <T extends unknown[], P>(fn: (...args: T) => PromiseLike<P>, ms?: number) => (...args: T) => Promise<unknown>;
11
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-utils",
3
- "version": "5.21.0",
3
+ "version": "5.23.0",
4
4
  "description": "Date, money and template management functions commonly needed in Cosmoz views.",
5
5
  "keywords": [
6
6
  "polymer",