Skip to content

Commit

Permalink
docs: fixed typo in P.when patterns code example
Browse files Browse the repository at this point in the history
  • Loading branch information
grigorischristainas committed Jun 10, 2024
1 parent 1071e07 commit 275b4e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ import { match, P } from 'ts-pattern';

type Input = { score: number };

const output = match({ score: 10 })
const output = match<Input>({ score: 10 })
.with(
{
score: P.when((score): score is 5 => score === 5),
Expand Down

0 comments on commit 275b4e6

Please sign in to comment.