@etsoo/shared 1.1.57 → 1.1.58

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 CHANGED
@@ -100,6 +100,7 @@ Data type definitions and type safe functions. ListItemType and ListItemType1 ar
100
100
  |IdItem|Item with id or id generator|
101
101
  |IdLabelItem|Item with id and label|
102
102
  |IdLabelType|Item with id and label dynamic type|
103
+ |IdNameItem|Item with id and name|
103
104
  |KeyCollection|Key collection, like { key1: {}, key2: {} }|
104
105
  |Keys|Get specific type keys|
105
106
  |ObjType|Generic object type|
@@ -173,6 +173,15 @@ export declare namespace DataTypes {
173
173
  */
174
174
  label: string;
175
175
  };
176
+ /**
177
+ * Item with id and name property
178
+ */
179
+ type IdNameItem<T extends IdType = number> = IdItem<T> & {
180
+ /**
181
+ * name field
182
+ */
183
+ name: string;
184
+ };
176
185
  /**
177
186
  * Item with id and label dynamic type
178
187
  */
@@ -173,6 +173,15 @@ export declare namespace DataTypes {
173
173
  */
174
174
  label: string;
175
175
  };
176
+ /**
177
+ * Item with id and name property
178
+ */
179
+ type IdNameItem<T extends IdType = number> = IdItem<T> & {
180
+ /**
181
+ * name field
182
+ */
183
+ name: string;
184
+ };
176
185
  /**
177
186
  * Item with id and label dynamic type
178
187
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/shared",
3
- "version": "1.1.57",
3
+ "version": "1.1.58",
4
4
  "description": "TypeScript shared utilities and functions",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -55,14 +55,14 @@
55
55
  "homepage": "https://github.com/ETSOO/Shared#readme",
56
56
  "devDependencies": {
57
57
  "@types/jest": "^29.0.3",
58
- "@typescript-eslint/eslint-plugin": "^5.37.0",
59
- "@typescript-eslint/parser": "^5.37.0",
60
- "eslint": "^8.23.1",
58
+ "@typescript-eslint/eslint-plugin": "^5.38.0",
59
+ "@typescript-eslint/parser": "^5.38.0",
60
+ "eslint": "^8.24.0",
61
61
  "eslint-config-airbnb-base": "^15.0.0",
62
62
  "eslint-plugin-import": "^2.26.0",
63
63
  "jest": "^29.0.3",
64
64
  "jest-environment-jsdom": "^29.0.3",
65
- "ts-jest": "^29.0.1",
65
+ "ts-jest": "^29.0.2",
66
66
  "typescript": "^4.8.3"
67
67
  }
68
68
  }
package/src/DataTypes.ts CHANGED
@@ -219,6 +219,16 @@ export namespace DataTypes {
219
219
  label: string;
220
220
  };
221
221
 
222
+ /**
223
+ * Item with id and name property
224
+ */
225
+ export type IdNameItem<T extends IdType = number> = IdItem<T> & {
226
+ /**
227
+ * name field
228
+ */
229
+ name: string;
230
+ };
231
+
222
232
  /**
223
233
  * Item with id and label dynamic type
224
234
  */