# Regle Typescript

> TypeScript integration for Regle — type-safe validated output (`InferSafeOutput`, `$validate`), inferring state from rules (`InferInput`), typing computed rules (`inferRules`, `RegleComputedRules`), and typing component props (`InferRegleRoot`, `RegleRoot`, `RegleFieldStatus`, `SuperCompatibleRegleRoot`). Use when typing rules schemas, passing `r$` between components, or extracting validated data types.

- Skill: `victorgarciaesgi/regle-typescript` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add victorgarciaesgi/regle-typescript`
- Raw SKILL.md: https://api.skillmd.com/api/skills/victorgarciaesgi/regle-typescript/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- License: MIT
- Author: victorgarciaesgi (https://skillmd.com/u/victorgarciaesgi)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/victorgarciaesgi/regle-typescript

---


# Regle TypeScript

Regle provides first-class TypeScript support with full type inference. This skill covers type-safe validation output, typing rules schemas, and typing component props.

## Key Exports

| Export | Package | Purpose |
|--------|---------|---------|
| `InferInput` | `@regle/core` | Infer state type from rules |
| `InferSafeOutput` | `@regle/core` | Infer validated output type from `r$` |
| `inferRules` | `@regle/core` | Preserve autocompletion in computed rules |
| `RegleComputedRules` | `@regle/core` | Type helper for explicit rule typing |
| `InferRegleRoot` | `@regle/core` | Extract `r$` type from a composable |
| `RegleFieldStatus` | `@regle/core` | Type for a single field status prop |

## References

| Topic | Description | Reference |
|-------|-------------|-----------|
| Type Safe Output | `$validate` return types, `InferSafeOutput` | [typescript-type-safe-output](references/typescript-type-safe-output.md) |
| Typing Rules | `inferRules`, `RegleComputedRules`, nested properties | [typescript-typing-rules](references/typescript-typing-rules.md) |
| Typing Props | `InferRegleRoot`, `RegleFieldStatus`, typing component props | [typescript-typing-props](references/typescript-typing-props.md) |

## Related skills

- **regle** — form setup with `useRegle`, validation properties.
- **regle-rules** — `inferRules` is used when typing computed rule objects.
- **regle-advanced** — scoped validation and patterns where typed props matter.

