functional-models 3.0.5 → 3.0.6
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/types.d.ts +2 -6
- package/types.js.map +1 -1
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -35,15 +35,11 @@ type JsonAble = Arrayable<JsonObj> | readonly (number | string | boolean)[] | nu
|
|
|
35
35
|
type JsonifiedData<T extends DataDescription> = {
|
|
36
36
|
readonly [P in keyof T]: JsonAble;
|
|
37
37
|
};
|
|
38
|
-
/**
|
|
39
|
-
* Removes the promise over a value
|
|
40
|
-
*/
|
|
41
|
-
type Unpromise<T extends Promise<any>> = T extends Promise<infer U> ? U : never;
|
|
42
38
|
/**
|
|
43
39
|
* Removes promises from every property of an object.
|
|
44
40
|
*/
|
|
45
41
|
type RemovePromises<T extends object> = {
|
|
46
|
-
[K in keyof T as T[K] extends Promise<any> ? K : never]:
|
|
42
|
+
[K in keyof T as T[K] extends Promise<any> ? K : never]: Awaited<T[K]>;
|
|
47
43
|
} & {
|
|
48
44
|
[K in keyof T as T[K] extends Promise<any> ? never : K]: T[K];
|
|
49
45
|
};
|
|
@@ -685,4 +681,4 @@ declare enum PrimitiveValueType {
|
|
|
685
681
|
* Dates can either be a Date or a string
|
|
686
682
|
*/
|
|
687
683
|
type DateValueType = Date | string;
|
|
688
|
-
export { PrimitiveValueType, PropertyType, MaybeFunction, Maybe, MaybePromise, Nullable, Arrayable, JsonAble, ToObjectFunction, ToObjectResult, ModelInstance, ModelType, PropertyValidatorComponent, PropertyValidatorComponentSync, PropertyValidatorComponentAsync, PropertyValidator, ModelValidatorComponent, PropertyInstance, PropertyConfig, DataValue, ValueGetter, ModelReferenceType, ModelDefinition, ModelFactoryOptions, ModelReferencePropertyInstance, PropertyGetters, PropertyValidators, PropertyValidatorComponentTypeAdvanced, DataDescription, ModelReferenceFunctions, ModelErrors, PrimaryKeyType, ModelFactory, ModelInstanceFetcher, CreateParams, ValidatorContext, ValuePropertyValidatorComponent, ValidationErrors, ComponentValidationErrorResponse, JsonifiedData, JsonObj, CalculateDenormalization, PropertiesList, MinimalModelDefinition, ChoiceTypes, PropertyConfigOptions, CommonValidators, DateValueType, ApiInfo, RestInfo, ApiMethod, RemovePromises, FlattenModelReferences,
|
|
684
|
+
export { PrimitiveValueType, PropertyType, MaybeFunction, Maybe, MaybePromise, Nullable, Arrayable, JsonAble, ToObjectFunction, ToObjectResult, ModelInstance, ModelType, PropertyValidatorComponent, PropertyValidatorComponentSync, PropertyValidatorComponentAsync, PropertyValidator, ModelValidatorComponent, PropertyInstance, PropertyConfig, DataValue, ValueGetter, ModelReferenceType, ModelDefinition, ModelFactoryOptions, ModelReferencePropertyInstance, PropertyGetters, PropertyValidators, PropertyValidatorComponentTypeAdvanced, DataDescription, ModelReferenceFunctions, ModelErrors, PrimaryKeyType, ModelFactory, ModelInstanceFetcher, CreateParams, ValidatorContext, ValuePropertyValidatorComponent, ValidationErrors, ComponentValidationErrorResponse, JsonifiedData, JsonObj, CalculateDenormalization, PropertiesList, MinimalModelDefinition, ChoiceTypes, PropertyConfigOptions, CommonValidators, DateValueType, ApiInfo, RestInfo, ApiMethod, RemovePromises, FlattenModelReferences, ApiInfoPartialRest, RestInfoMinimum, };
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAolBA;;GAEG;AACH,IAAK,SAMJ;AAND,WAAK,SAAS;IACZ,8BAAiB,CAAA;IACjB,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACnB,CAAC,EANI,SAAS,yBAAT,SAAS,QAMb;AAgTD;;;GAGG;AACH,IAAK,YAaJ;AAbD,WAAK,YAAY;IACf,qCAAqB,CAAA;IACrB,6BAAa,CAAA;IACb,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,iDAAiC,CAAA;IACjC,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,mCAAmB,CAAA;AACrB,CAAC,EAbI,YAAY,4BAAZ,YAAY,QAahB;AAED;;GAEG;AACH,IAAK,kBAMJ;AAND,WAAK,kBAAkB;IACrB,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACrB,CAAC,EANI,kBAAkB,kCAAlB,kBAAkB,QAMtB"}
|