@etsoo/shared 1.0.99 → 1.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/lib/cjs/DataTypes.d.ts +2 -2
- package/lib/mjs/DataTypes.d.ts +2 -2
- package/package.json +1 -1
- package/src/DataTypes.ts +4 -3
package/lib/cjs/DataTypes.d.ts
CHANGED
|
@@ -117,9 +117,9 @@ export declare namespace DataTypes {
|
|
|
117
117
|
* Add or edit conditional type for same data model
|
|
118
118
|
* Dynamic add changedFields for editing case
|
|
119
119
|
*/
|
|
120
|
-
type AddOrEditType<T, Editing extends boolean> = Editing extends true ? T & {
|
|
120
|
+
type AddOrEditType<T, Editing extends boolean> = (Editing extends true ? T : Partial<T>) & {
|
|
121
121
|
changedFields?: string[];
|
|
122
|
-
}
|
|
122
|
+
};
|
|
123
123
|
/**
|
|
124
124
|
* Enum value type
|
|
125
125
|
*/
|
package/lib/mjs/DataTypes.d.ts
CHANGED
|
@@ -117,9 +117,9 @@ export declare namespace DataTypes {
|
|
|
117
117
|
* Add or edit conditional type for same data model
|
|
118
118
|
* Dynamic add changedFields for editing case
|
|
119
119
|
*/
|
|
120
|
-
type AddOrEditType<T, Editing extends boolean> = Editing extends true ? T & {
|
|
120
|
+
type AddOrEditType<T, Editing extends boolean> = (Editing extends true ? T : Partial<T>) & {
|
|
121
121
|
changedFields?: string[];
|
|
122
|
-
}
|
|
122
|
+
};
|
|
123
123
|
/**
|
|
124
124
|
* Enum value type
|
|
125
125
|
*/
|
package/package.json
CHANGED
package/src/DataTypes.ts
CHANGED
|
@@ -151,9 +151,10 @@ export namespace DataTypes {
|
|
|
151
151
|
* Add or edit conditional type for same data model
|
|
152
152
|
* Dynamic add changedFields for editing case
|
|
153
153
|
*/
|
|
154
|
-
export type AddOrEditType<
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
export type AddOrEditType<
|
|
155
|
+
T,
|
|
156
|
+
Editing extends boolean
|
|
157
|
+
> = (Editing extends true ? T : Partial<T>) & { changedFields?: string[] };
|
|
157
158
|
|
|
158
159
|
/**
|
|
159
160
|
* Enum value type
|