happy-rusty 1.1.0 → 1.1.1

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.
@@ -1,8 +1,8 @@
1
- [**happy-rusty**](../index.md) • **Docs**
1
+ [**happy-rusty**](../README.md) • **Docs**
2
2
 
3
3
  ***
4
4
 
5
- [happy-rusty](../index.md) / Some
5
+ [happy-rusty](../README.md) / Some
6
6
 
7
7
  # Function: Some()
8
8
 
@@ -13,16 +13,16 @@ function Some<T>(value): Option<T>
13
13
  Creates an `Option<T>` representing the presence of a value.
14
14
  This function is typically used to construct an `Option` that contains a value, indicating that the operation yielding the value was successful.
15
15
 
16
- ## Type parameters
16
+ ## Type Parameters
17
17
 
18
- | Type parameter | Description |
19
- | :------ | :------ |
18
+ | Type Parameter | Description |
19
+ | ------ | ------ |
20
20
  | `T` | The type of the value to be wrapped in a `Some`. |
21
21
 
22
22
  ## Parameters
23
23
 
24
24
  | Parameter | Type | Description |
25
- | :------ | :------ | :------ |
25
+ | ------ | ------ | ------ |
26
26
  | `value` | `T` | The value to wrap as a `Some` option. |
27
27
 
28
28
  ## Returns
@@ -40,6 +40,6 @@ if (maybeValue.isSome()) {
40
40
  }
41
41
  ```
42
42
 
43
- ## Source
43
+ ## Defined in
44
44
 
45
- [enum/prelude.ts:627](https://github.com/JiangJie/happy-rusty/blob/15ed105e08c6cc3943e22243c9386336a521d83e/src/enum/prelude.ts#L627)
45
+ [prelude.ts:625](https://github.com/JiangJie/happy-rusty/blob/82bfb94138be23b97750c830432d7e013c0e5b80/src/enum/prelude.ts#L625)
@@ -1,8 +1,8 @@
1
- [**happy-rusty**](../index.md) • **Docs**
1
+ [**happy-rusty**](../README.md) • **Docs**
2
2
 
3
3
  ***
4
4
 
5
- [happy-rusty](../index.md) / promiseToResult
5
+ [happy-rusty](../README.md) / promiseToResult
6
6
 
7
7
  # Function: promiseToResult()
8
8
 
@@ -13,17 +13,17 @@ function promiseToResult<T, E>(p): Promise<Result<T, E>>
13
13
  Converts a Promise to a Result type, capturing the resolved value in an `Ok`, or the error in an `Err`.
14
14
  This allows for promise-based asynchronous operations to be handled in a way that is more in line with the Result pattern.
15
15
 
16
- ## Type parameters
16
+ ## Type Parameters
17
17
 
18
- | Type parameter | Value | Description |
19
- | :------ | :------ | :------ |
18
+ | Type Parameter | Default type | Description |
19
+ | ------ | ------ | ------ |
20
20
  | `T` | - | The type of the value that the promise resolves to. |
21
21
  | `E` | `Error` | The type of the error that the promise may reject with, defaults to `Error`. |
22
22
 
23
23
  ## Parameters
24
24
 
25
25
  | Parameter | Type | Description |
26
- | :------ | :------ | :------ |
26
+ | ------ | ------ | ------ |
27
27
  | `p` | `Promise`\<`T`\> | The promise to convert into a `Result` type. |
28
28
 
29
29
  ## Returns
@@ -45,6 +45,6 @@ async function example() {
45
45
  }
46
46
  ```
47
47
 
48
- ## Source
48
+ ## Defined in
49
49
 
50
- [enum/prelude.ts:959](https://github.com/JiangJie/happy-rusty/blob/15ed105e08c6cc3943e22243c9386336a521d83e/src/enum/prelude.ts#L959)
50
+ [prelude.ts:957](https://github.com/JiangJie/happy-rusty/blob/82bfb94138be23b97750c830432d7e013c0e5b80/src/enum/prelude.ts#L957)