Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

RequestResult

a shared result type that encapsulates errors instead of throwing them, allows you to optionally specify the ErrorType

type RequestResult<T, ErrorType extends Error = AuthError> = {
data: T;
error: null;
}
| {
data: null;
error: Error extends AuthError ? AuthError : ErrorType;
}
;

§Type Parameters

§
ErrorType extends Error = AuthError
[src]

§Type

§
{
data: T;
error: null;
}
| {
data: null;
error: Error extends AuthError ? AuthError : ErrorType;
}
[src]