About regle-typescript
regle-typescript is a skill about Regle's TypeScript support, focusing on type-safe validation output, rule schemas, and component props. It is for developers who need typed Regle forms and components.
Key features
- 01Infer input and validated output types
- 02Type rule schemas
- 03Preserve autocomplete for computed rules
- 04Extract composable and field status types
Use cases
- 01Infer safe output after validation
- 02Type computed rule objects
- 03Annotate component props with Regle types
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ victorgarciaesgi/ regle --skill regle-typescriptAfter installing, type/regle-typescriptin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/typescript-type-safe-output.mdtypescript-typing-props.mdtypescript-typing-rules.mdDetails
From the project READMERegle 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 |
| Typing Rules | inferRules, RegleComputedRules, nested properties | typescript-typing-rules |
| Typing Props | InferRegleRoot, RegleFieldStatus, typing component props | typescript-typing-props |
Related skills
- regle — form setup with
useRegle, validation properties. - regle-rules —
inferRulesis used when typing computed rule objects. - regle-advanced — scoped validation and patterns where typed props matter.
Comments
Markdown supported