@etsoo/shared 1.1.93 → 1.1.94
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/README.md +1 -1
- package/lib/cjs/DataTypes.d.ts +10 -0
- package/lib/mjs/DataTypes.d.ts +10 -0
- package/package.json +1 -1
- package/src/DataTypes.ts +7 -0
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ Array related utilities
|
|
|
105
105
|
|toUnique|Make all items are unique|
|
|
106
106
|
|
|
107
107
|
## DataTypes
|
|
108
|
-
Data type definitions and type safe functions. ListItemType and
|
|
108
|
+
Data type definitions and type safe functions. ListItemType, ListItemType1 and ListItemType2 are sugar types.
|
|
109
109
|
|
|
110
110
|
|Name|Description|
|
|
111
111
|
|---:|---|
|
package/lib/cjs/DataTypes.d.ts
CHANGED
|
@@ -395,6 +395,16 @@ export type ListType = DataTypes.IdLabelItem<number>;
|
|
|
395
395
|
* List item with string id type
|
|
396
396
|
*/
|
|
397
397
|
export type ListType1 = DataTypes.IdLabelItem<string>;
|
|
398
|
+
/**
|
|
399
|
+
* List item with compatible id and name / label
|
|
400
|
+
*/
|
|
401
|
+
export type ListType2 = {
|
|
402
|
+
id: DataTypes.IdType;
|
|
403
|
+
} & ({
|
|
404
|
+
label: string;
|
|
405
|
+
} | {
|
|
406
|
+
name: string;
|
|
407
|
+
});
|
|
398
408
|
/**
|
|
399
409
|
* Id default type
|
|
400
410
|
*/
|
package/lib/mjs/DataTypes.d.ts
CHANGED
|
@@ -395,6 +395,16 @@ export type ListType = DataTypes.IdLabelItem<number>;
|
|
|
395
395
|
* List item with string id type
|
|
396
396
|
*/
|
|
397
397
|
export type ListType1 = DataTypes.IdLabelItem<string>;
|
|
398
|
+
/**
|
|
399
|
+
* List item with compatible id and name / label
|
|
400
|
+
*/
|
|
401
|
+
export type ListType2 = {
|
|
402
|
+
id: DataTypes.IdType;
|
|
403
|
+
} & ({
|
|
404
|
+
label: string;
|
|
405
|
+
} | {
|
|
406
|
+
name: string;
|
|
407
|
+
});
|
|
398
408
|
/**
|
|
399
409
|
* Id default type
|
|
400
410
|
*/
|
package/package.json
CHANGED
package/src/DataTypes.ts
CHANGED
|
@@ -754,6 +754,13 @@ export type ListType = DataTypes.IdLabelItem<number>;
|
|
|
754
754
|
*/
|
|
755
755
|
export type ListType1 = DataTypes.IdLabelItem<string>;
|
|
756
756
|
|
|
757
|
+
/**
|
|
758
|
+
* List item with compatible id and name / label
|
|
759
|
+
*/
|
|
760
|
+
export type ListType2 = {
|
|
761
|
+
id: DataTypes.IdType;
|
|
762
|
+
} & ({ label: string } | { name: string });
|
|
763
|
+
|
|
757
764
|
/**
|
|
758
765
|
* Id default type
|
|
759
766
|
*/
|