@typedly/collection 6.0.0 → 6.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typedly/collection",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "author": "wwwdev.io <dev@wwwdev.io>",
5
5
  "description": "A TypeScript type definitions package for data collections with customizable storage.",
6
6
  "license": "MIT",
@@ -9,7 +9,8 @@
9
9
  "registry": "https://registry.npmjs.org"
10
10
  },
11
11
  "peerDependencies": {
12
- "@typedly/adaptable-data": "^4.1.0"
12
+ "@typedly/data": "^6.1.0",
13
+ "@typedly/data-traits": "^2.0.0"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -1,4 +1,4 @@
1
- import { IterableElement, DataShape, AsyncReturn, DataSettings, InferValue } from '@typedly/data';
1
+ import { IterableElement, DataShape, AsyncReturn, InferAsync, DataSettings, InferValue } from '@typedly/data';
2
2
  import { Collection } from '@typedly/data-traits';
3
3
  import { ConstrainedConstructor } from '@typedly/constructor';
4
4
 
@@ -74,12 +74,12 @@ interface CollectionAdapterConstructor<A extends CollectionAdapter<T, E, R>, E,
74
74
  * @export
75
75
  * @interface CollectionConstructor
76
76
  * @template {CollectionShape<T, E, R>} S The collection shape type.
77
- * @template {Iterable<E>} [T=S extends CollectionShape<infer U, any, any> ? U : unknown] The type of the elements in the collection, inferred from the collection shape or defaults to `unknown` if not specified.
78
- * @template [E=S extends CollectionShape<any, infer U, any> ? U : unknown] The element type inferred from the collection shape or defaults to `unknown` if not specified.
79
- * @template {boolean} [R=S extends CollectionShape<any, any, infer U> ? U : false] The async behavior flag inferred from the collection shape or defaults to `false` if not specified.
77
+ * @template {Iterable<E>} [T=InferCollectionType<S>] The type of the elements in the collection, inferred from the collection shape or defaults to `unknown` if not specified.
78
+ * @template [E=InferElement<S>] The element type inferred from the collection shape or defaults to `unknown` if not specified.
79
+ * @template {boolean} [R=InferAsync<S>] The async behavior flag inferred from the collection shape or defaults to `false` if not specified.
80
80
  * @extends {ConstrainedConstructor<CollectionShape<T, E, R>, S, E[]>}
81
81
  */
82
- interface CollectionConstructor<S extends CollectionShape<T, E, R>, T extends Iterable<E> = S extends CollectionShape<infer U, any, any> ? U : unknown, E = S extends CollectionShape<any, infer U, any> ? U : unknown, R extends boolean = S extends CollectionShape<any, any, infer U> ? U : false> extends ConstrainedConstructor<CollectionShape<T, E, R>, S, E[]> {
82
+ interface CollectionConstructor<S extends CollectionShape<T, E, R>, T extends Iterable<E> = InferCollectionType<S>, E = InferElement<S>, R extends boolean = InferAsync<S>> extends ConstrainedConstructor<CollectionShape<T, E, R>, S, E[]> {
83
83
  }
84
84
 
85
85
  /**