-
Notifications
You must be signed in to change notification settings - Fork 0
Class.DisposableResult
GitHub Actions edited this page Apr 10, 2024
·
5 revisions
resultar / DisposableResult
A Disposable
is an object that has a dispose
method that can be used to
clean up resources.
• T
• E
-
Resultable
<T
,E
> Disposable
new DisposableResult<
T
,E
>(result
,finalizer
):DisposableResult
<T
,E
>
• result: Resultable
<T
, E
>
• finalizer
DisposableResult
<T
, E
>
private
readonly
finalizer: (value
,error
) =>void
• value: T
• error: E
void
readonly
result:Resultable
<T
,E
>
get
error():E
E
get
value():T
T
[dispose]():
void
void
Disposable.[dispose]
_unsafeUnwrap(
config
?):T
• config?: ErrorConfig
T
Resultable._unsafeUnwrap
_unsafeUnwrapErr(
config
?):E
• config?: ErrorConfig
E
Resultable._unsafeUnwrapErr
isErr():
boolean
boolean
Resultable.isErr
isOk():
boolean
boolean
Resultable.isOk
unwrapOr<
A
>(defaultValue
):T
|A
• A
• defaultValue: A
T
| A
Resultable.unwrapOr