yummies 7.0.1 → 7.2.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/package.json +1 -1
- package/types.d.ts +13 -1
- package/types.global.d.ts +12 -0
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -28,6 +28,10 @@ type ExtractEnumValues<T> = `${T & string}` | (T & number);
|
|
|
28
28
|
* @returns T or `undefined` or `null`
|
|
29
29
|
*/
|
|
30
30
|
type Maybe<T> = Nullable<T> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Removes `null` and `undefined` from a type.
|
|
33
|
+
*/
|
|
34
|
+
type NotMaybe<T> = Exclude<T, null | undefined>;
|
|
31
35
|
/**
|
|
32
36
|
* Represents a type that can be either the specified type or `null`.
|
|
33
37
|
*
|
|
@@ -35,6 +39,10 @@ type Maybe<T> = Nullable<T> | undefined;
|
|
|
35
39
|
* @returns `T` or `null`
|
|
36
40
|
*/
|
|
37
41
|
type Nullable<T> = T | null;
|
|
42
|
+
/**
|
|
43
|
+
* Removes `null` from a type.
|
|
44
|
+
*/
|
|
45
|
+
type NotNullable<T> = Exclude<T, null>;
|
|
38
46
|
/**
|
|
39
47
|
* Represents any object with any keys and any values.
|
|
40
48
|
*
|
|
@@ -47,6 +55,10 @@ type AnyObject = Record<keyof any, any>;
|
|
|
47
55
|
* @returns Record with no keys and no values
|
|
48
56
|
*/
|
|
49
57
|
type EmptyObject = Record<keyof any, never>;
|
|
58
|
+
/**
|
|
59
|
+
* T or T[];
|
|
60
|
+
*/
|
|
61
|
+
type MaybeArray<T> = T | T[];
|
|
50
62
|
/**
|
|
51
63
|
* Represents all primitive types in TypeScript.
|
|
52
64
|
*
|
|
@@ -426,4 +438,4 @@ type AnyBoolean = boolean & {};
|
|
|
426
438
|
*/
|
|
427
439
|
type UpperFirst<S extends string> = S extends `${infer F}${infer R}` ? `${Uppercase<F>}${R}` : S;
|
|
428
440
|
|
|
429
|
-
export type { AllPropertiesOptional, AnyBoolean, AnyFunction, AnyNumber, AnyObject, AnyPrimitive, AnyString, BrowserNativeObject, Class, CopyObject, DeepPartial, Defined, EmptyObject, ExtractEnumKeys, ExtractEnumValues, ExtractObjects, FalsyValues, Fn, HasKey, HasSpecificKey, IfEquals, IndexKeys, IsAny, IsArray, IsEmptyArray, IsFunction, IsObject, IsObjectEmpty, IsPartial, IsUnknown, KeyOfByValue, LiteralUnion, Maybe, MaybeFalsy, MaybeFn, MaybePromise, MaybeValues, NonReadonly, NonUndefined, Nullable, OmitByValue, OverrideKey, Params, PartialIf, PartialKeys, PickByValue, Primitive, ReadonlyKeys, RecordEntries, RenameKey, RequiredKeys, UnionToIntersection, Unpromise, UpperFirst, ValueOf, WithRequired, WritableKeys };
|
|
441
|
+
export type { AllPropertiesOptional, AnyBoolean, AnyFunction, AnyNumber, AnyObject, AnyPrimitive, AnyString, BrowserNativeObject, Class, CopyObject, DeepPartial, Defined, EmptyObject, ExtractEnumKeys, ExtractEnumValues, ExtractObjects, FalsyValues, Fn, HasKey, HasSpecificKey, IfEquals, IndexKeys, IsAny, IsArray, IsEmptyArray, IsFunction, IsObject, IsObjectEmpty, IsPartial, IsUnknown, KeyOfByValue, LiteralUnion, Maybe, MaybeArray, MaybeFalsy, MaybeFn, MaybePromise, MaybeValues, NonReadonly, NonUndefined, NotMaybe, NotNullable, Nullable, OmitByValue, OverrideKey, Params, PartialIf, PartialKeys, PickByValue, Primitive, ReadonlyKeys, RecordEntries, RenameKey, RequiredKeys, UnionToIntersection, Unpromise, UpperFirst, ValueOf, WithRequired, WritableKeys };
|
package/types.global.d.ts
CHANGED
|
@@ -29,6 +29,10 @@ type ExtractEnumValues<T> = `${T & string}` | (T & number);
|
|
|
29
29
|
* @returns T or `undefined` or `null`
|
|
30
30
|
*/
|
|
31
31
|
type Maybe<T> = Nullable<T> | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Removes `null` and `undefined` from a type.
|
|
34
|
+
*/
|
|
35
|
+
type NotMaybe<T> = Exclude<T, null | undefined>;
|
|
32
36
|
/**
|
|
33
37
|
* Represents a type that can be either the specified type or `null`.
|
|
34
38
|
*
|
|
@@ -36,6 +40,10 @@ type Maybe<T> = Nullable<T> | undefined;
|
|
|
36
40
|
* @returns `T` or `null`
|
|
37
41
|
*/
|
|
38
42
|
type Nullable<T> = T | null;
|
|
43
|
+
/**
|
|
44
|
+
* Removes `null` from a type.
|
|
45
|
+
*/
|
|
46
|
+
type NotNullable<T> = Exclude<T, null>;
|
|
39
47
|
/**
|
|
40
48
|
* Represents any object with any keys and any values.
|
|
41
49
|
*
|
|
@@ -48,6 +56,10 @@ type AnyObject = Record<keyof any, any>;
|
|
|
48
56
|
* @returns Record with no keys and no values
|
|
49
57
|
*/
|
|
50
58
|
type EmptyObject = Record<keyof any, never>;
|
|
59
|
+
/**
|
|
60
|
+
* T or T[];
|
|
61
|
+
*/
|
|
62
|
+
type MaybeArray<T> = T | T[];
|
|
51
63
|
/**
|
|
52
64
|
* Represents all primitive types in TypeScript.
|
|
53
65
|
*
|