Skip to content
tRPC

Partners

Type Alias: SafeResult<TData, TErrorShape>

On this page

SafeResult<TData, TErrorShape>: readonly [TData, undefined] | readonly [undefined, inferSafeError<TErrorShape>]

Defined in: packages/client/src/safe.ts:28

What safe() resolves to: [data, undefined] or [undefined, error].

Type Parameters

Type Parameter
TData
TErrorShape

See

https://trpc.io/docs/client/vanilla/error-handling#errors-as-values-with-safe