Skip to content

isMatching(pattern, value) is broken for most patterns in v5.6.1 #306

@zoontek

Description

@zoontek

Describe the bug

5.6.1 introduced a regression where isMatching(pattern, value) cannot be used with the vast majority of patterns. On the other end, isMatching(pattern)(value) works fine.

TypeScript playground with a minimal reproduction case

Example: Playground

Versions

  • TypeScript version: 5.7.3
  • ts-pattern version: 5.6.1
  • environment: Edge v130 / Node v22.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions