tsentials-rules
CommunityCompose sync and async business validation rules.
Software Engineering#TypeScript#validation#business logic#result types#rule engine#railway oriented programming#async pipeline
Authorsenrecep
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It helps you express business validation as small, typed predicates and combine them into reliable rule sets, avoiding tangled conditionals and inconsistent error handling.
Core Features & Use Cases
- Composable Rule Engine: Build validation logic from sync and async rules and combine them with and/or/linear/if patterns.
- Typed and Untyped Rule Variants: Use
Rule<TContext>/AsyncRule<TContext>for void outcomes, andTypedRule/TypedAsyncRulewhen you need a success value (Result<TResult>). - Deterministic Evaluation Modes: Choose between collecting all failures (
and*) or stopping at the first failure (linear*), and support conditional branching viaif*. - Context-Aware Errors: Create rules from predicates with fixed or factory-based error providers.
Quick Start
Use the tsentials-rules skill to evaluate an and-composed registration rule for a user context and return all validation errors at once.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: tsentials-rules Download link: https://github.com/senrecep/tsentials/archive/main.zip#tsentials-rules Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.