[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Result](https://evolu.dev/docs/api-reference/common/Result) › getOk

```ts
function getOk<T>(result: Result<T>): T;
```

Defined in: [packages/common/src/Result.ts:386](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Result.ts#L386)

Extracts the value from a [Result](https://evolu.dev/docs/api-reference/common/Result/type-aliases/Result) whose error type is `never`.

This is useful when the type system guarantees the result cannot fail (for
example `Result<T, never>`), avoiding impossible `if (!result.ok)` branches
at call sites.