> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# SchemaLike<T>

> Interface exported by @botmesh/core.

Defined in: [flows/schema.ts:41](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/schema.ts#L41)

Structural, zod-compatible schema: anything with `safeParse(input)`. When `safeParseAsync`
exists it is preferred (zod schemas with async refinements throw from `safeParse`).
`T` is the parsed (output) type stored in `c.state` / returned by `c.ask`.

## Type Parameters

| Type Parameter | Default type |
| - | - |
|  `T` | `unknown` |

## Methods

### safeParse()

```ts theme={null}
safeParse(input): 
  | SchemaParseResult<T>
| Promise<SchemaParseResult<T>>;
```

Defined in: [flows/schema.ts:42](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/schema.ts#L42)

#### Parameters

| Parameter | Type |
| - | - |
| `input` | `unknown` |

#### Returns

\| [`SchemaParseResult`](https://botmesh.afaya.com.co/api/core/type-aliases/SchemaParseResult)\<`T`>
\| `Promise`\<[`SchemaParseResult`](https://botmesh.afaya.com.co/api/core/type-aliases/SchemaParseResult)\<`T`>>

***

### safeParseAsync()?

```ts theme={null}
safeParseAsync?(input): Promise<SchemaParseResult<T>>;
```

Defined in: [flows/schema.ts:43](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/schema.ts#L43)

#### Parameters

| Parameter | Type |
| - | - |
| `input` | `unknown` |

#### Returns

`Promise`\<[`SchemaParseResult`](https://botmesh.afaya.com.co/api/core/type-aliases/SchemaParseResult)\<`T`>>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.