result_option 0.1.4 → 0.1.5
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare class Option<T> {
|
|
|
9
9
|
* @param value
|
|
10
10
|
* @returns `Option<T>` where `Some(value)` if `value` !== null and `None` if `value` === null.
|
|
11
11
|
*/
|
|
12
|
-
static
|
|
12
|
+
static from<T>(value: T | null): Option<T>;
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @param value - The value to be `Some`.
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ export class Option {
|
|
|
23
23
|
* @param value
|
|
24
24
|
* @returns `Option<T>` where `Some(value)` if `value` !== null and `None` if `value` === null.
|
|
25
25
|
*/
|
|
26
|
-
static
|
|
26
|
+
static from(value) {
|
|
27
27
|
return value === null ? Option.None() : Option.Some(value);
|
|
28
28
|
}
|
|
29
29
|
/**
|