awesome-repositories.com
المدونة
MCP
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
gvergnaud avatar

gvergnaud/ts-pattern

0
View on GitHub↗
15,034 نجوم·168 تفرعات·TypeScript·MIT·12 مشاهدات

Ts Pattern

This library provides a declarative approach to conditional logic in TypeScript, replacing imperative branching with structural pattern matching. It functions as a tool for decomposing complex data structures and mapping them to specific execution branches, ensuring that all possible states are accounted for during development.

The library distinguishes itself by enforcing exhaustive logic, which requires developers to address every possible branch of a data structure to prevent runtime errors. By leveraging compile-time type narrowing and recursive evaluation, it allows for the validation and transformation of deeply nested objects while maintaining strict type safety throughout the control flow.

Beyond its core matching capabilities, the library supports complex data validation and functional state transformation. It provides a framework for evaluating incoming data against defined structural requirements, ensuring that variations in input are processed in a predictable and type-safe manner.

Features

  • Pattern Matching - Provides a type-safe utility for exhaustive pattern matching and data structure decomposition in TypeScript.
  • Pattern Matching Libraries - Maps input data to specific execution branches using a declarative syntax that replaces traditional imperative conditional logic blocks.
  • Type Narrowing - Refines variable types within conditional branches based on structural pattern matching.
  • Exhaustiveness Checkers - Require every possible branch of a data structure to be addressed during development to prevent unexpected runtime errors when processing incomplete or missing state information.
  • Functional Utility Libraries - Exhaustive pattern matching library for TypeScript.
  • Type-Level Conditional Logic - Implements robust branching logic that guarantees type safety and exhaustive coverage at compile time.
  • Data Validation - Enforces structural rules and type requirements on incoming data to ensure safe processing.
  • Structural Data Validators - Evaluate incoming data against specific structural requirements and execute the corresponding logic to ensure every variation of the input is processed safely and predictably throughout the application.
  • Recursive Validation Engines - Handles nested data structures by dynamically dispatching validation logic across type hierarchies.
  • Type-Safe Data Handling - Ensures all possible data states are covered at compile time through type-safe control flow mechanisms.
  • Functional State Management - Processes complex nested objects by mapping patterns to functional logic for reliable state transformation.

سجل النجوم

مخطط تاريخ النجوم لـ gvergnaud/ts-patternمخطط تاريخ النجوم لـ gvergnaud/ts-pattern

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

الأسئلة الشائعة

ما هي وظيفة gvergnaud/ts-pattern؟

This library provides a declarative approach to conditional logic in TypeScript, replacing imperative branching with structural pattern matching. It functions as a tool for decomposing complex data structures and mapping them to specific execution branches, ensuring that all possible states are accounted for during development.

ما هي الميزات الرئيسية لـ gvergnaud/ts-pattern؟

الميزات الرئيسية لـ gvergnaud/ts-pattern هي: Pattern Matching, Pattern Matching Libraries, Type Narrowing, Exhaustiveness Checkers, Functional Utility Libraries, Type-Level Conditional Logic, Data Validation, Structural Data Validators.

ما هي البدائل مفتوحة المصدر لـ gvergnaud/ts-pattern؟

تشمل البدائل مفتوحة المصدر لـ gvergnaud/ts-pattern: crystal-lang/crystal — Crystal is a statically typed, compiled programming language designed for high performance and memory safety. It… python/mypy — mypy is a static type checker for Python that analyzes source code to detect type errors and inconsistencies without… evhub/coconut — Coconut is a functional programming language that compiles to Python. It functions as a source-to-source compiler,… elm/compiler — This project is a functional programming compiler and JavaScript transpiler that transforms a statically typed… go-ozzo/ozzo-validation — ozzo-validation is a programmable data validation library for Go that verifies structs, maps, and primitive types… ianstormtaylor/superstruct — Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined…

بدائل مفتوحة المصدر لـ Ts Pattern

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Ts Pattern.
  • crystal-lang/crystalالصورة الرمزية لـ crystal-lang

    crystal-lang/crystal

    20,299عرض على GitHub↗

    Crystal is a statically typed, compiled programming language designed for high performance and memory safety. It leverages an LLVM-based compiler to translate source code into optimized machine-executable binaries, while its type-inference-based static analysis enforces strict safety rules during the build process. The language distinguishes itself through a fiber-based concurrent runtime that manages lightweight execution units for asynchronous input and output without blocking the main process. It also features a powerful compile-time macro system that allows for the inspection and transfor

    Crystalcompilercrystalcrystal-language
    عرض على GitHub↗20,299
  • python/mypyالصورة الرمزية لـ python

    python/mypy

    20,489عرض على GitHub↗

    mypy is a static type checker for Python that analyzes source code to detect type errors and inconsistencies without executing the program. It functions as a static analysis tool and type inference engine, providing a gradual typing system that allows type hints to be added to a codebase incrementally while maintaining compatibility with dynamic typing. The project distinguishes itself through a combination of performance and precision features. It utilizes a daemon-based incremental checking system and multi-process parallel analysis to manage large codebases, supported by binary cache persi

    Pythonlinterpythontypechecker
    عرض على GitHub↗20,489
  • elm/compilerالصورة الرمزية لـ elm

    elm/compiler

    7,794عرض على GitHub↗

    This project is a functional programming compiler and JavaScript transpiler that transforms a statically typed language into optimized JavaScript for web browsers. It serves as a frontend architecture framework, providing a static type system and a package manager that enforces semantic versioning. The compiler uses a type-checking engine with automatic type inference to prevent runtime errors and guide code refactoring. It implements a structural pattern for managing application state and rendering user interfaces through a virtual DOM, utilizing immutable data and purity-based state transit

    Haskellcompilerelm
    عرض على GitHub↗7,794
  • evhub/coconutالصورة الرمزية لـ evhub

    evhub/coconut

    4,338عرض على GitHub↗

    Coconut is a functional programming language that compiles to Python. It functions as a source-to-source compiler, translating high-level functional syntax into compatible Python code to maintain runtime compatibility. The language introduces a logic system for pattern matching and destructuring complex data structures. It provides a mechanism for tail call optimization to prevent stack overflow errors during deep recursive function calls and employs a lazy evaluation engine to defer computations until results are explicitly required. The project includes support for algebraic data types, pi

    Python
    عرض على GitHub↗4,338
عرض جميع البدائل الـ 30 لـ Ts Pattern→