@resultsafe/core-fp-result 0.1.8 → 0.1.10
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/README.md +305 -302
- package/README.ru.md +304 -302
- package/docs/api/README.md +52 -7
- package/docs/api/{constructors → functions}/Err.md +9 -11
- package/docs/api/{constructors → functions}/Ok.md +9 -11
- package/docs/api/{methods → functions}/andThen.md +9 -11
- package/docs/api/{methods/err.md → functions/err-1.md} +9 -11
- package/docs/api/{methods → functions}/expect.md +10 -12
- package/docs/api/{methods → functions}/expectErr.md +10 -12
- package/docs/api/{methods → functions}/flatten.md +9 -11
- package/docs/api/{methods → functions}/inspect.md +9 -11
- package/docs/api/{methods → functions}/inspectErr.md +9 -11
- package/docs/api/{guards → functions}/isErr.md +9 -11
- package/docs/api/{guards → functions}/isErrAnd.md +9 -11
- package/docs/api/{guards → functions}/isOk.md +9 -11
- package/docs/api/{guards → functions}/isOkAnd.md +9 -11
- package/docs/api/{refiners → functions}/isTypedVariant.md +11 -13
- package/docs/api/{refiners → functions}/isTypedVariantOf.md +11 -13
- package/docs/api/{methods → functions}/map.md +9 -11
- package/docs/api/{methods → functions}/mapErr.md +9 -11
- package/docs/api/{methods → functions}/match.md +9 -11
- package/docs/api/{refiners → functions}/matchVariant.md +9 -11
- package/docs/api/{refiners → functions}/matchVariantStrict.md +10 -12
- package/docs/api/{methods/ok.md → functions/ok-1.md} +9 -11
- package/docs/api/{methods → functions}/orElse.md +9 -11
- package/docs/api/{refiners → functions}/refineAsyncResult.md +17 -19
- package/docs/api/{refiners → functions}/refineAsyncResultU.md +9 -11
- package/docs/api/{refiners → functions}/refineResult.md +17 -19
- package/docs/api/{refiners → functions}/refineResultU.md +9 -11
- package/docs/api/{refiners → functions}/refineVariantMap.md +9 -11
- package/docs/api/{methods → functions}/tap.md +9 -11
- package/docs/api/{methods → functions}/tapErr.md +9 -11
- package/docs/api/{methods → functions}/transpose.md +9 -11
- package/docs/api/{methods → functions}/unwrap.md +10 -12
- package/docs/api/{methods → functions}/unwrapErr.md +10 -12
- package/docs/api/{methods → functions}/unwrapOr.md +9 -11
- package/docs/api/{methods → functions}/unwrapOrElse.md +9 -11
- package/docs/api/type-aliases/Handler.md +1 -1
- package/docs/api/type-aliases/MatchBuilder.md +1 -1
- package/docs/api/type-aliases/Matcher.md +1 -1
- package/docs/api/type-aliases/SyncRefinedResult.md +1 -1
- package/docs/api/type-aliases/SyncRefinedResultUnion.md +1 -1
- package/docs/api/type-aliases/SyncValidatorMap.md +1 -1
- package/docs/api/type-aliases/UniversalAsyncRefinedResult.md +1 -1
- package/docs/api/type-aliases/UniversalRefinedResult.md +1 -1
- package/docs/api/type-aliases/VariantOf.md +1 -1
- package/docs/examples/auth/index.md +1 -1
- package/docs/examples/auth/token.md +1 -1
- package/docs/examples/connection/connect.md +1 -1
- package/docs/examples/connection/index.md +1 -1
- package/docs/examples/connection/reconnect.md +1 -1
- package/docs/examples/errors/index.md +1 -1
- package/docs/examples/errors/retry.md +1 -1
- package/docs/examples/index.md +1 -1
- package/docs/examples/streaming/index.md +1 -1
- package/docs/examples/streaming/text.md +1 -1
- package/docs/meta/AI-AGENT-RULES.md +1 -1
- package/docs/meta/CONTEXT.md +1 -1
- package/docs/meta/MANIFEST.md +1 -1
- package/docs/meta/registry/COUNTERS.md +1 -1
- package/docs/meta/registry/ENTITIES.md +1 -1
- package/package.json +1 -1
- package/docs/api/constructors/index.md +0 -7
- package/docs/api/guards/index.md +0 -9
- package/docs/api/index.md +0 -9
- package/docs/api/methods/index.md +0 -24
- package/docs/api/modules.md +0 -10
- package/docs/api/refiners/index.md +0 -14
- package/docs/api/type-aliases/index.md +0 -14
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[**@resultsafe/core-fp-result v0.1.0**](../README.md)
|
|
1
|
+
[**@resultsafe/core-fp-result v0.1.9**](../README.md)
|
|
4
2
|
|
|
5
3
|
***
|
|
6
4
|
|
|
7
5
|
[@resultsafe/core-fp-result](../README.md) / unwrapErr
|
|
8
6
|
|
|
9
|
-
#
|
|
7
|
+
# Function: unwrapErr()
|
|
10
8
|
|
|
11
9
|
> **unwrapErr**\<`T`, `E`\>(`result`): `E`
|
|
12
10
|
|
|
13
11
|
Возвращает значение ошибки или выбрасывает исключение, если результат `Ok`.
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Type Parameters
|
|
16
14
|
|
|
17
15
|
### T
|
|
18
16
|
|
|
@@ -26,7 +24,7 @@
|
|
|
26
24
|
|
|
27
25
|
Тип значения ошибки.
|
|
28
26
|
|
|
29
|
-
##
|
|
27
|
+
## Parameters
|
|
30
28
|
|
|
31
29
|
### result
|
|
32
30
|
|
|
@@ -34,25 +32,25 @@
|
|
|
34
32
|
|
|
35
33
|
Исходный `Result`.
|
|
36
34
|
|
|
37
|
-
##
|
|
35
|
+
## Returns
|
|
38
36
|
|
|
39
37
|
`E`
|
|
40
38
|
|
|
41
39
|
Payload ошибки.
|
|
42
40
|
|
|
43
|
-
##
|
|
41
|
+
## Throws
|
|
44
42
|
|
|
45
43
|
Error - Выбрасывает исключение при вызове на `Ok`.
|
|
46
44
|
|
|
47
|
-
##
|
|
45
|
+
## Since
|
|
48
46
|
|
|
49
47
|
0.1.0
|
|
50
48
|
|
|
51
|
-
##
|
|
49
|
+
## See
|
|
52
50
|
|
|
53
|
-
[unwrapOrElse](
|
|
51
|
+
[unwrapOrElse](unwrapOrElse.md) - Возвращает fallback успеха без выброса исключения.
|
|
54
52
|
|
|
55
|
-
##
|
|
53
|
+
## Example
|
|
56
54
|
|
|
57
55
|
```ts
|
|
58
56
|
import { Err, unwrapErr } from '@resultsafe/core-fp-result';
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[**@resultsafe/core-fp-result v0.1.0**](../README.md)
|
|
1
|
+
[**@resultsafe/core-fp-result v0.1.9**](../README.md)
|
|
4
2
|
|
|
5
3
|
***
|
|
6
4
|
|
|
7
5
|
[@resultsafe/core-fp-result](../README.md) / unwrapOr
|
|
8
6
|
|
|
9
|
-
#
|
|
7
|
+
# Function: unwrapOr()
|
|
10
8
|
|
|
11
9
|
> **unwrapOr**\<`T`, `E`\>(`result`, `defaultValue`): `T`
|
|
12
10
|
|
|
13
11
|
Возвращает успешное значение или переданный fallback по умолчанию.
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Type Parameters
|
|
16
14
|
|
|
17
15
|
### T
|
|
18
16
|
|
|
@@ -26,7 +24,7 @@
|
|
|
26
24
|
|
|
27
25
|
Тип значения ошибки.
|
|
28
26
|
|
|
29
|
-
##
|
|
27
|
+
## Parameters
|
|
30
28
|
|
|
31
29
|
### result
|
|
32
30
|
|
|
@@ -40,21 +38,21 @@
|
|
|
40
38
|
|
|
41
39
|
Fallback-значение для `Err`.
|
|
42
40
|
|
|
43
|
-
##
|
|
41
|
+
## Returns
|
|
44
42
|
|
|
45
43
|
`T`
|
|
46
44
|
|
|
47
45
|
Payload успеха или `defaultValue`.
|
|
48
46
|
|
|
49
|
-
##
|
|
47
|
+
## Since
|
|
50
48
|
|
|
51
49
|
0.1.0
|
|
52
50
|
|
|
53
|
-
##
|
|
51
|
+
## See
|
|
54
52
|
|
|
55
|
-
[unwrapOrElse](
|
|
53
|
+
[unwrapOrElse](unwrapOrElse.md) - Вычисляет fallback лениво.
|
|
56
54
|
|
|
57
|
-
##
|
|
55
|
+
## Example
|
|
58
56
|
|
|
59
57
|
```ts
|
|
60
58
|
import { Err, unwrapOr } from '@resultsafe/core-fp-result';
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[**@resultsafe/core-fp-result v0.1.0**](../README.md)
|
|
1
|
+
[**@resultsafe/core-fp-result v0.1.9**](../README.md)
|
|
4
2
|
|
|
5
3
|
***
|
|
6
4
|
|
|
7
5
|
[@resultsafe/core-fp-result](../README.md) / unwrapOrElse
|
|
8
6
|
|
|
9
|
-
#
|
|
7
|
+
# Function: unwrapOrElse()
|
|
10
8
|
|
|
11
9
|
> **unwrapOrElse**\<`T`, `E`\>(`result`, `fn`): `T`
|
|
12
10
|
|
|
13
11
|
Возвращает успешное значение или вычисляет fallback из ошибки.
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Type Parameters
|
|
16
14
|
|
|
17
15
|
### T
|
|
18
16
|
|
|
@@ -26,7 +24,7 @@
|
|
|
26
24
|
|
|
27
25
|
Тип значения ошибки.
|
|
28
26
|
|
|
29
|
-
##
|
|
27
|
+
## Parameters
|
|
30
28
|
|
|
31
29
|
### result
|
|
32
30
|
|
|
@@ -40,21 +38,21 @@
|
|
|
40
38
|
|
|
41
39
|
Функция-поставщик fallback для `Err`.
|
|
42
40
|
|
|
43
|
-
##
|
|
41
|
+
## Returns
|
|
44
42
|
|
|
45
43
|
`T`
|
|
46
44
|
|
|
47
45
|
Payload успеха или вычисленный fallback.
|
|
48
46
|
|
|
49
|
-
##
|
|
47
|
+
## Since
|
|
50
48
|
|
|
51
49
|
0.1.0
|
|
52
50
|
|
|
53
|
-
##
|
|
51
|
+
## See
|
|
54
52
|
|
|
55
|
-
[unwrapOr](
|
|
53
|
+
[unwrapOr](unwrapOr.md) - Использует eager fallback-значение.
|
|
56
54
|
|
|
57
|
-
##
|
|
55
|
+
## Example
|
|
58
56
|
|
|
59
57
|
```ts
|
|
60
58
|
import { Err, unwrapOrElse } from '@resultsafe/core-fp-result';
|
package/docs/examples/index.md
CHANGED
package/docs/meta/CONTEXT.md
CHANGED
package/docs/meta/MANIFEST.md
CHANGED
package/package.json
CHANGED
package/docs/api/guards/index.md
DELETED
package/docs/api/index.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Методы
|
|
2
|
-
|
|
3
|
-
> [Back to package README](../../../README.md) | [Back to API index](../index.md)
|
|
4
|
-
|
|
5
|
-
Символы модуля:
|
|
6
|
-
- [andThen](./andThen.md)
|
|
7
|
-
- [err](./err.md)
|
|
8
|
-
- [expect](./expect.md)
|
|
9
|
-
- [expectErr](./expectErr.md)
|
|
10
|
-
- [flatten](./flatten.md)
|
|
11
|
-
- [inspect](./inspect.md)
|
|
12
|
-
- [inspectErr](./inspectErr.md)
|
|
13
|
-
- [map](./map.md)
|
|
14
|
-
- [mapErr](./mapErr.md)
|
|
15
|
-
- [match](./match.md)
|
|
16
|
-
- [ok](./ok.md)
|
|
17
|
-
- [orElse](./orElse.md)
|
|
18
|
-
- [tap](./tap.md)
|
|
19
|
-
- [tapErr](./tapErr.md)
|
|
20
|
-
- [transpose](./transpose.md)
|
|
21
|
-
- [unwrap](./unwrap.md)
|
|
22
|
-
- [unwrapErr](./unwrapErr.md)
|
|
23
|
-
- [unwrapOr](./unwrapOr.md)
|
|
24
|
-
- [unwrapOrElse](./unwrapOrElse.md)
|
package/docs/api/modules.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Modules
|
|
2
|
-
|
|
3
|
-
> [Back to package README](../../README.md) | [Back to API index](./index.md)
|
|
4
|
-
|
|
5
|
-
Module entry points:
|
|
6
|
-
- [Конструкторы](./constructors/index.md)
|
|
7
|
-
- [Гарды](./guards/index.md)
|
|
8
|
-
- [Методы](./methods/index.md)
|
|
9
|
-
- [Рефайнеры](./refiners/index.md)
|
|
10
|
-
- [Type Aliases](./type-aliases/index.md)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Рефайнеры
|
|
2
|
-
|
|
3
|
-
> [Back to package README](../../../README.md) | [Back to API index](../index.md)
|
|
4
|
-
|
|
5
|
-
Символы модуля:
|
|
6
|
-
- [isTypedVariant](./isTypedVariant.md)
|
|
7
|
-
- [isTypedVariantOf](./isTypedVariantOf.md)
|
|
8
|
-
- [matchVariant](./matchVariant.md)
|
|
9
|
-
- [matchVariantStrict](./matchVariantStrict.md)
|
|
10
|
-
- [refineAsyncResult](./refineAsyncResult.md)
|
|
11
|
-
- [refineAsyncResultU](./refineAsyncResultU.md)
|
|
12
|
-
- [refineResult](./refineResult.md)
|
|
13
|
-
- [refineResultU](./refineResultU.md)
|
|
14
|
-
- [refineVariantMap](./refineVariantMap.md)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Type Aliases
|
|
2
|
-
|
|
3
|
-
> [Back to package README](../../../README.md) | [Back to API index](../index.md)
|
|
4
|
-
|
|
5
|
-
Published helper type aliases:
|
|
6
|
-
- [Handler](./Handler.md)
|
|
7
|
-
- [MatchBuilder](./MatchBuilder.md)
|
|
8
|
-
- [Matcher](./Matcher.md)
|
|
9
|
-
- [SyncRefinedResult](./SyncRefinedResult.md)
|
|
10
|
-
- [SyncRefinedResultUnion](./SyncRefinedResultUnion.md)
|
|
11
|
-
- [SyncValidatorMap](./SyncValidatorMap.md)
|
|
12
|
-
- [UniversalAsyncRefinedResult](./UniversalAsyncRefinedResult.md)
|
|
13
|
-
- [UniversalRefinedResult](./UniversalRefinedResult.md)
|
|
14
|
-
- [VariantOf](./VariantOf.md)
|