yummies 7.0.1 → 7.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yummies",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "keywords": [
5
5
  "javascript",
6
6
  "typescript",
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
  *
@@ -426,4 +434,4 @@ type AnyBoolean = boolean & {};
426
434
  */
427
435
  type UpperFirst<S extends string> = S extends `${infer F}${infer R}` ? `${Uppercase<F>}${R}` : S;
428
436
 
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 };
437
+ 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, 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
  *