@tolki/types 1.4.0 → 1.5.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 +1 -1
- package/src/data.d.ts +10 -0
package/package.json
CHANGED
package/src/data.d.ts
CHANGED
|
@@ -2,6 +2,16 @@ export type DataItems<TValue, TKey extends PropertyKey = PropertyKey> =
|
|
|
2
2
|
| TValue[]
|
|
3
3
|
| Record<TKey, TValue>;
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Data that may also be supplied as one of the iterable structures that stand
|
|
7
|
+
* in for a PHP `iterable`: a Map for keyed items, or any other iterable such
|
|
8
|
+
* as a generator or a Set for positional items.
|
|
9
|
+
*/
|
|
10
|
+
export type DataIterableItems<TValue, TKey extends PropertyKey = PropertyKey> =
|
|
11
|
+
| DataItems<TValue, TKey>
|
|
12
|
+
| Map<TKey, TValue>
|
|
13
|
+
| Iterable<TValue>;
|
|
14
|
+
|
|
5
15
|
export interface Countable {
|
|
6
16
|
count(): number;
|
|
7
17
|
}
|