Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript Identical Types

class Car {
  drive() {
    // hit the gas
  }
}
class Golfer {
  drive() {
    // hit the ball far
  }
}
// No error?
let w: Car = new Golfer();
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #typescript #Identical #Types
ADD COMMENT
Topic
Name
3+8 =