---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/extension/functions/mapOf.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/extension](../index.md) / mapOf

# mapOf()

> **mapOf**<`V`>(`value`): `ZodMiniPipe`<`ZodMiniOptional`<`ZodMiniNullable`<`ZodMiniRecord`<`ZodMiniString`<`string`>, `V`>>>, `ZodMiniTransform`<`Record`<`string`, `output`<`V`>>, `Record`<`string`, `output`<`V`>> | `null` | `undefined`>>

Free-form map (keys are data, not fields): preserves the keys and replaces `null`/missing with `{}`.
For SDK packages (via `@getenginex/sdk/extension`), not for apps.

## Type Parameters

### V

`V` *extends* `ZodMiniType`<`unknown`, `unknown`, `$ZodTypeInternals`<`unknown`, `unknown`>>

## Parameters

### value

`V`

## Returns

`ZodMiniPipe`<`ZodMiniOptional`<`ZodMiniNullable`<`ZodMiniRecord`<`ZodMiniString`<`string`>, `V`>>>, `ZodMiniTransform`<`Record`<`string`, `output`<`V`>>, `Record`<`string`, `output`<`V`>> | `null` | `undefined`>>

## Example

```ts
wire({ balances: mapOf(z.number()) }) // { BRL: 1000 } stays { BRL: 1000 }
```
