# Ok

```ts
function Ok(): Result<void>
```

Construct a successful [Result](https://frontside.com/effection/api/v4-next/Result.md).

### Example

```javascript
import { Ok } from 'effection';

let result = Ok("hello");
// { ok: true, value: "hello" }
```

### Return Type


[Result](https://frontside.com/effection/api/v4-next/Result.md)&lt;void&gt;

[View code](https://github.com/thefrontside/effection/tree/effection-v4.2.0/lib/result.ts#L35)

```ts
function Ok<T>(value: T): Result<T>
```

### Type Parameters
T


### Parameters


**value**: T
### Return Type


[Result](https://frontside.com/effection/api/v4-next/Result.md)&lt;T&gt;

[View code](https://github.com/thefrontside/effection/tree/effection-v4.2.0/lib/result.ts#L36)

```ts
function Ok<T>(value?: T): Result<T | undefined>
```

### Type Parameters
T


### Parameters


**value**<span class="inline-block bg-sky-100 rounded px-2 text-sm text-sky-900 mx-1">optional</span>: T
### Return Type


[Result](https://frontside.com/effection/api/v4-next/Result.md)&lt;T | undefined&gt;

[View code](https://github.com/thefrontside/effection/tree/effection-v4.2.0/lib/result.ts#L37)
