utils/dynamicResult
此内容尚不支持你的语言。
Type Aliases
Section titled “Type Aliases”Failure
Section titled “Failure”type Failure<E> = [null, E];
Defined in: utils/dynamicResult.ts:11^
The Failure type represents a failure with an error of type E. It is used to indicate that an operation failed and contains the error.
Type Parameters
Section titled “Type Parameters”E
Result
Section titled “Result”type Result<T, E> = | Success<T>| Failure<E>;
Defined in: utils/dynamicResult.ts:19^
The Result type is a discriminated union that can either be a Success or a Failure. It is used to represent the outcome of an operation, where:
- Success
represents a successful result with a value of type T. - Failure
represents a failure with an error of type E.
Type Parameters
Section titled “Type Parameters”T
E
Success
Section titled “Success”type Success<T> = [T, null];
Defined in: utils/dynamicResult.ts:5^
The Success type represents a successful result with a value of type T. It is used to indicate that an operation was successful and contains the result.
Type Parameters
Section titled “Type Parameters”T