We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
import {match, select} from "ts-pattern"; const r1 = match({$not: ["B"]}) .with({$not: [select("term")]}, ({term}) => term) .run() console.log(r1); // [ "B" ] const r2 = match({a: [{$not: ["B"]}]}) .with({a: [{$not: [select("term")]}]}, ({term}) => term) .run() console.log(r2); // [ [ "B" ] ]
I was expecting these to both log "B". Is this correct? Thanks!
"B"
Code Sandbox with a minimal reproduction case https://codesandbox.io/s/bitter-moon-hwnzz
Versions
The text was updated successfully, but these errors were encountered:
Hey, that's expected. This is a duplicate of #62 and #46.
Here is the relevant doc section: https://github.com/gvergnaud/ts-pattern#lists-arrays
This will probably change in the next major version, see: #46 (comment)
Sorry, something went wrong.
No branches or pull requests
Describe the bug
I was expecting these to both log
"B"
. Is this correct? Thanks!Code Sandbox with a minimal reproduction case
https://codesandbox.io/s/bitter-moon-hwnzz
Versions
The text was updated successfully, but these errors were encountered: