# Variable: INK\_DEV\_API\_TEXT\_REPLACES (/jsdoc/pixi-vn-ink/vite/variables/INK_DEV_API_TEXT_REPLACES)



\> `const` **INK\_DEV\_API\_TEXT\_REPLACES**: `"/__pixi-vn-ink/text-replaces"` = `"/__pixi-vn-ink/text-replaces"`

Defined in: [src/vite/costants.ts:39](https://github.com/DRincs-Productions/pixi-vn-ink/blob/cf876d4db655e65b32a20a362a828ecba73f4786/src/vite/costants.ts#L39)

Dev-server endpoint that exposes and accepts the list of registered
TextReplaces handlers as [InkTextReplaceInfo](/jsdoc/pixi-vn-ink/vite/interfaces/InkTextReplaceInfo) objects.

* `GET  /__pixi-vn-ink/text-replaces` – returns the stored `InkTextReplaceInfo[]` as JSON.
* `POST /__pixi-vn-ink/text-replaces` – replaces the stored list with the JSON body
  (`InkTextReplaceInfo[]`). Called automatically by setupInkHmrListener on
  startup and after each HMR update.
* `InkTextReplaceInfo.validation` serializes the original validation rule:
  * `{ type: "regexp", source, flags }`
  * `{ type: "zod", schema }` (JSON Schema generated from Zod)
  * `{ type: "literal", value }` for string modes like `"all"` / `"characterId"`

Example [#example]

```ts
// VS Code extension reading the registered text-replace handlers
const res = await fetch("http://localhost:5173/__pixi-vn-ink/text-replaces");
const replaces: InkTextReplaceInfo[] = await res.json();
```
