Decode the value to an object. This implies nothing about the value that is being decoded, which can be anything. You could take a "plain" integer and "lift" it into an object.
Properties you want the object to have
const decoder = Decode.object({ value: Decode.integer,});decode(decoder, 42) // { value: 42 }decode(decoder, 100) // { value: 100 }decode(decoder, '100') // Fails Copy
const decoder = Decode.object({ value: Decode.integer,});decode(decoder, 42) // { value: 42 }decode(decoder, 100) // { value: 100 }decode(decoder, '100') // Fails
Generated using TypeDoc
Decode the value to an object. This implies nothing about the value that is being decoded, which can be anything. You could take a "plain" integer and "lift" it into an object.