Created
June 18, 2017 00:27
-
-
Save devonzuegel/9b5325546ea9522a26750a59164b64c5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { | |
bar: string|number | |
} | |
interface Baz extends Foo { | |
bar: string | |
} | |
const qux: Foo = {bar: 1} // Good | |
const corg: Baz = {bar: 1} // TypeError: Types of property 'bar' are incompatible |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment