# Function: computedSchemas()

```ts
function computedSchemas(definition, definitionOf): Readonly<Record<string, Readonly<Record<string, unknown>>>>;
```

Defined in: [packages/core/src/query/computed.ts:223](https://github.com/leifriksheim/minca/blob/main/core/src/query/computed.ts#L223)

Each of a collection's computed fields as JSON Schema, `readOnly`, for an
app that shows records from their definitions: a count is an integer, a
comparison a boolean. A field whose type can't be worked out is `{}`. Any
value may also be null, where it can't be worked out for a record.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `definition` | \{ `computed?`: `Readonly`\<`Record`\<`string`, `string`\>\>; `name`: `string`; `schema`: `unknown`; \} |
| `definition.computed?` | `Readonly`\<`Record`\<`string`, `string`\>\> |
| `definition.name` | `string` |
| `definition.schema` | `unknown` |
| `definitionOf` | (`collection`) => `LinkingCollection` \| `null` |

## Returns

`Readonly`\<`Record`\<`string`, `Readonly`\<`Record`\<`string`, `unknown`\>\>\>\>
