Skip to content

Commit d009053

Browse files
committed
docs(README.md): add note about readonly props
1 parent 359cfa3 commit d009053

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ type Thing = t.ExtractType<typeof ThingValidator>
249249
```
250250
251251
The type of `Thing` will be `{ name: string, comment?: string }`. Note that the property types in the explicit type parameter
252-
(`any`) are ignored. The type parameter just indicates which
253-
properties are required and which are optional.
252+
(`any`) are ignored. The type parameter just indicates which properties are required and which are optional, and also allows
253+
you to mark properties readonly. These attributes will be reflected in `t.ExtractType`.
254254
255255
You can also use the `t.optionalNullOr(t.string())` as a shorthand for
256256
`t.optional(t.nullOr(t.string()))`.

0 commit comments

Comments
 (0)