Skip to content

Instantly share code, notes, and snippets.

@devonzuegel
Created June 18, 2017 00:27
Show Gist options
  • Save devonzuegel/9b5325546ea9522a26750a59164b64c5 to your computer and use it in GitHub Desktop.
Save devonzuegel/9b5325546ea9522a26750a59164b64c5 to your computer and use it in GitHub Desktop.
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