Created
March 8, 2020 22:54
-
-
Save colinhacks/d1e20ba88cfba708360937726deeed58 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
const A = t.type({ | |
foo: t.string, | |
}); | |
const B = t.partial({ | |
bar: t.number, | |
}); | |
const C = t.intersection([A, B]); | |
type C = t.TypeOf<typeof C>; | |
// { | |
// foo: string; | |
// bar?: number | undefined | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment