Skip to content

Commit

Permalink
Merge pull request #260 from grigorischristainas/docs/when
Browse files Browse the repository at this point in the history
docs: fix typo in `P.when` patterns code example
  • Loading branch information
gvergnaud authored Jun 12, 2024
2 parents 1071e07 + 275b4e6 commit 7d08131
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 7d08131

Please sign in to comment.