inferred-types 0.52.14 → 0.52.15
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.
|
@@ -2,8 +2,8 @@ import { ObjectKey, RequiredKeysTuple, AnyObject, IsWideContainer, IsEqual, Empt
|
|
|
2
2
|
/**
|
|
3
3
|
* **HasRequiredProps**`<T>`
|
|
4
4
|
*
|
|
5
|
-
* Receives
|
|
6
|
-
* the
|
|
5
|
+
* Receives `T` and returns true/false based on whether
|
|
6
|
+
* the `T` is an object _and_ has at least one required property on it.
|
|
7
7
|
*/
|
|
8
8
|
export type HasRequiredProps<T extends AnyObject> = IsWideContainer<T> extends true ? IsEqual<T, EmptyObject> extends true ? false : boolean : RequiredKeysTuple<T> extends readonly ObjectKey[] ? RequiredKeysTuple<T>["length"] extends 0 ? false : true : false;
|
|
9
9
|
//# sourceMappingURL=HasRequiredProps.d.ts.map
|