Last active
January 9, 2020 12:05
-
-
Save fluidsonic/2ca84c54b64e603ab6e1137b095760e8 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
interface Foo { | |
a: number; // no b | |
} | |
interface Bar { | |
a: number; b: string | |
} | |
function logB(value: Foo | Bar) { | |
console.log(value.b) // We cannot access .b as it isn't defined on Foo. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment