Skip to content

Instantly share code, notes, and snippets.

@wongjiahau
Created July 2, 2019 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wongjiahau/0660e8cb9965fd14946b825444f90798 to your computer and use it in GitHub Desktop.
Save wongjiahau/0660e8cb9965fd14946b825444f90798 to your computer and use it in GitHub Desktop.
interface Shape {}
class Circle extends Shape {
constructor(public radius: number) {}
}
class Rectangle extends Shape {
construtor(public height: number, public width: number) {}
}
class Triangle extends Shape {
constructor(public height: number, public base: number) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment