Skip to content

Commit 81a9549

Browse files
authored
fix: closing bracket in example
1 parent 43db447 commit 81a9549

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/concept/state-decorate.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ app
3434
.get('/version', ({
3535
getDate,
3636
store: { version }
37-
}) => `${version} ${getDate()}`
38-
)
37+
}) => `${version} ${getDate()}`)
3938
```
4039

4140
- `version` is registered using `state`, and accessible via `Context.store.version`.
@@ -54,7 +53,7 @@ app
5453
.state(({ b, ...rest }) => rest)
5554
.get('/version', ({
5655
store: { a }
57-
}) => a
56+
}) => a)
5857
```
5958

6059
## TypeScript
@@ -65,7 +64,7 @@ app
6564
.state('version', 1 as number | null)
6665
.get('/version', ({
6766
store: { version }
68-
}) => version
67+
}) => version)
6968
```
7069

7170
If the explicit type doesn't type `null` or `undefined`, make sure to set `strict` to `true` in `tsconfig.json`:

0 commit comments

Comments
 (0)