# Type Alias: SafeResult<TData, TErrorShape>

> 

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

Defined in: [packages/client/src/safe.ts:28](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/client/src/safe.ts#L28)

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
