Skip to content

P.when behaves incorrectly in corner cases when types have intersection #333

@mordv

Description

@mordv

Describe the bug
The bug is strange and I think self explanatory, see playground, comments starting with !!!

TypeScript playground with a minimal reproduction case

Example: Playground

Versions

  • TypeScript version: 5.8.* 5.9.*
  • ts-pattern version: 5.8.0
  • environment: TS playground

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