(value: A, options?: {
readonly waiting?: boolean | undefined
readonly timestamp?: number | undefined
})
| 248 | * @since 4.0.0 |
| 249 | */ |
| 250 | export const success = <A, E = never>(value: A, options?: { |
| 251 | readonly waiting?: boolean | undefined |
| 252 | readonly timestamp?: number | undefined |
| 253 | }): Success<A, E> => { |
| 254 | const result = Object.create(ResultProto) |
| 255 | result._tag = "Success" |
| 256 | result.value = value |
| 257 | result.waiting = options?.waiting ?? false |
| 258 | result.timestamp = options?.timestamp ?? Date.now() |
| 259 | return result |
| 260 | } |
| 261 | |
| 262 | /** |
| 263 | * Failed `AsyncResult` containing a failure cause and the latest previous success when one is available. |
no outgoing calls
no test coverage detected