@wenex/sdk 0.4.1 → 0.4.3
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.
|
@@ -27,10 +27,10 @@ type CoreT = {
|
|
|
27
27
|
};
|
|
28
28
|
type RequiredSerializerItems<T extends CoreT> = MakeRequired<T, 'id' | 'owner' | 'clients' | 'created_at' | 'created_by' | 'created_in' | 'version' | 'rand' | 'timestamp'>;
|
|
29
29
|
export type Population = 'id' | 'owner' | 'shares' | 'clients';
|
|
30
|
-
export type Serializer<T extends CoreT, Populate extends Population = 'id'> = Populate extends 'id' ? RequiredSerializerItems<T> : RequiredSerializerItems<Omit<T, Populate
|
|
30
|
+
export type Serializer<T extends CoreT, Populate extends Population = 'id'> = Populate[] extends 'id' ? RequiredSerializerItems<T> : RequiredSerializerItems<Omit<T, Populate> & Pick<{
|
|
31
31
|
id: string;
|
|
32
32
|
owner?: User;
|
|
33
33
|
shares?: User[];
|
|
34
34
|
clients?: Client[];
|
|
35
|
-
}, Populate
|
|
35
|
+
}, Populate>>;
|
|
36
36
|
export {};
|