# ResultMetadataFromSchema

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

```ts
type ResultMetadataFromSchema<TSchema> = [TSchema] extends [
  | StandardJSONSchemaV1<any, any>
| StandardSchemaV1<any, any>] ? InferSchemaType<TSchema> : Record<string, unknown>;
```

Defined in: [packages/ai/src/types.ts:201](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L201)

The result metadata type that a `resultMetadataSchema` gives.
A Standard Schema gives its own type. No schema, or a plain JSON Schema,
gives `Record<string, unknown>`.

## Type Parameters

### TSchema

`TSchema`
