fnts 1.5.1 → 1.5.2

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/maybe/just.d.ts CHANGED
@@ -11,11 +11,11 @@ export declare const jid: unique symbol;
11
11
  * key, holding the provided value type.
12
12
  */
13
13
  export declare type Just<Value> = {
14
- [jid]: Exclude<Value, null | undefined>;
14
+ [jid]: NonNullable<Value>;
15
15
  };
16
16
  /**
17
17
  * Constructor function for `Just`.
18
18
  * Creates the special object with one property, represented as unique symbol
19
19
  * key, holding the provided value.
20
20
  */
21
- export default function just<Value>(value: Value): Just<Value>;
21
+ export default function just<Value extends NonNullable<any>>(value: Value): Just<Value>;
package/maybe/maybe.d.ts CHANGED
@@ -12,4 +12,9 @@ export declare type Maybe<Value> = Just<Value> | Nothing;
12
12
  * Constructor function for `Maybe`.
13
13
  * Creates either `just` of a provided value, or `nothing`.
14
14
  */
15
- export default function maybe<Value>(value: Value | null | undefined): Maybe<Value>;
15
+ export default function maybe(value: null | undefined): Nothing;
16
+ /**
17
+ * Constructor function for `Maybe`.
18
+ * Creates either `just` of a provided value, or `nothing`.
19
+ */
20
+ export default function maybe<Value>(value: Value | null | undefined): Just<Value>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fnts",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "license": "MIT",
5
5
  "author": "Dmytro Vasylkivskyi",
6
6
  "description": "TypeScript / JavaScript FP utilities",