diff --git a/Decoder.md b/Decoder.md index 96e0d4991..c4ef3acb5 100644 --- a/Decoder.md +++ b/Decoder.md @@ -349,7 +349,7 @@ console.log(isRight(NumberFromString.decode('a'))) // => false # Extracting static types from decoders -Static types can be extracted from decoders using the `TypeOf` operator +Static types can be extracted from decoders using the `TypeOf` and `InputOf` operators ```ts export const Person = D.type({ @@ -364,6 +364,11 @@ type Person = { age: number; } */ + +type PersonInputType = D.InputOf +/* +type PersonInputType = unknown +*/ ``` Note that you can define an `interface` instead of a type alias