FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

TypeScriptSamples/interfaces/README.md at master · birendra7654/TypeScriptSamples · GitHub

Repository navigation

Latest commit

 

History

History
18 lines (14 loc) · 570 Bytes
  1. TypeScriptSamples
  2. interfaces

README.md

File metadata and controls

18 lines (14 loc) · 570 Bytes

TypeScript Sample: Simple

Overview

Simple use of classes and inheritance:

  • Interface: A simple interface that defines the interface for something that can drive.
  • Class: An implementation of a car.

Keep Playing

Want to experiment? Try adding a second interface: Flyable. Implement it in a Helicopter class, then write a FlyingCar class that implements both Drivable and Flyable!

interface Flyable { ... }
class Helicopter implements Flyable { ... }
class FlyingCar implements Drivable, Flyable { ... }

Running

tsc --sourcemap interfaces.ts


Back | FazBrowse Home | New Git URL