Last active
September 9, 2019 20:45
-
-
Save dgieselaar/9af5e8dc30309ed2b312e81a45766cba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as t from 'io-ts'; | |
/* | |
This codec represents the following TypeScript type: | |
{ | |
title: string, | |
content: string, | |
options: { | |
private?: boolean | |
} | |
} | |
*/ | |
const codec = t.type({ | |
title: t.string, | |
content: t.string, | |
options: t.partial({ | |
private: t.boolean, | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment