schemaglobin
Advanced tools
Comparing version 5.5.1 to 5.6.0
@@ -21,3 +21,3 @@ /** Helper type that allows `null` if `R` (required) is false. */ | ||
/** | ||
* Partial object: a convert an object to its partial version. | ||
* Partial object: deeply convert an object to its partial version. | ||
* - Any value that extends `UnknownObject`has its props made partial. | ||
@@ -30,1 +30,35 @@ * - Works deeply on nested objects too. | ||
} : T; | ||
/** | ||
* Mutable type is the opposite of `Readonly<T>` helper type. | ||
* - See https://github.com/microsoft/TypeScript/issues/24509 | ||
*/ | ||
export declare type Mutable<T> = { | ||
-readonly [K in keyof T]: T[K]; | ||
}; | ||
/** | ||
* Mutable object: deeply convert an object to its mutable version. | ||
* - Like `Mutable<T>` but follows the same pattern and rules as `PartialObject` | ||
* - Any value that extends `UnknownObject`has its props made mutable. | ||
* - Works deeply on nested objects too. | ||
* - Only makes plain objects changed (i.e. objects that extend `UnknownObject`), not arrays and functions. | ||
*/ | ||
export declare type MutableObject<T> = T extends UnknownObject ? { | ||
-readonly [K in keyof T]: MutableObject<T[K]>; | ||
} : T; | ||
/** | ||
* Readonly object: deeply convert an object to its readonly version. | ||
* - Like `Readonly<T>` but follows the same pattern and rules as `PartialObject` | ||
* - Any value that extends `UnknownObject`has its props made readonly. | ||
* - Works deeply on nested objects too. | ||
* - Only makes plain objects changed (i.e. objects that extend `UnknownObject`), not arrays and functions. | ||
*/ | ||
export declare type ReadonlyObject<T> = T extends UnknownObject ? { | ||
+readonly [K in keyof T]: ReadonlyObject<T[K]>; | ||
} : T; | ||
/** | ||
* Constructor: a class constructor that can be used with `new X` | ||
* - Type passed in must | ||
*/ | ||
export declare type Constructor<T extends EmptyObject | UnknownObject = UnknownObject> = { | ||
new (): T; | ||
}; |
{ | ||
"name": "schemaglobin", | ||
"description": "Validate user-entered data.", | ||
"version": "5.5.1", | ||
"version": "5.6.0", | ||
"repository": "https://github.com/dhoulb/schemaglobin", | ||
@@ -6,0 +6,0 @@ "author": "Dave Houlbrooke <dave@shax.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155972
2935