# Callable

```ts
interface Callable<T extends Operation<unknown> | PromiseLike<unknown> | unknown, TArgs extends unknown[] = []>
```

A uniform integration type representing anything that can be evaluated
as a the parameter to [call](https://frontside.com/effection/api/v4/call.md).

[call](https://frontside.com/effection/api/v4/call.md) converts a `Callable` into an `Operation` which can then be used
anywhere within Effection.

APIs that accept `Callable` values allow end developers to pass simple
functions without necessarily needing to know anything about Operations.

### Examples
#### Example 1
```javascript
function hello(to: Callable<string>): Operation<string> {
  return function*() {
    return `hello ${yield* call(to)}`;
  }
}

await run(() => hello(() => "world!")); // => "hello world!"
await run(() => hello(async () => "world!")); // => "hello world!"
await run(() => hello(function*() { return "world!" })); // => "hello world!"
```
---


### Type Parameters
T extends [Operation](https://frontside.com/effection/api/v4/Operation.md)&lt;unknown&gt; | PromiseLike&lt;unknown&gt; | unknown


TArgs extends unknown&lbrack;&rbrack; = &lbrack;&rbrack;

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