We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43db447 commit 81a9549Copy full SHA for 81a9549
docs/concept/state-decorate.md
@@ -34,8 +34,7 @@ app
34
.get('/version', ({
35
getDate,
36
store: { version }
37
- }) => `${version} ${getDate()}`
38
-)
+ }) => `${version} ${getDate()}`)
39
```
40
41
- `version` is registered using `state`, and accessible via `Context.store.version`.
@@ -54,7 +53,7 @@ app
54
53
.state(({ b, ...rest }) => rest)
55
56
store: { a }
57
- }) => a
+ }) => a)
58
59
60
## TypeScript
@@ -65,7 +64,7 @@ app
65
64
.state('version', 1 as number | null)
66
67
68
- }) => version
+ }) => version)
69
70
71
If the explicit type doesn't type `null` or `undefined`, make sure to set `strict` to `true` in `tsconfig.json`:
0 commit comments