Skip to content

Commit

Permalink
add tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
marihachi committed Jul 30, 2023
1 parent 01ad5a6 commit 9853f9c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/tutorials/state.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_position: 6
---

# 状態で処理を分岐する

```ts
T.alt([
T.where(state => state.flag,
T.str('a'),
),
T.str('b'),
]).state('flag', () => true);
```

0 comments on commit 9853f9c

Please sign in to comment.