Cat.ts 285 B

1234567891011121314151617
  1. import { Animal } from './Animal';
  2. import { capitalize as upper } from './utils';
  3. export class Cat extends Animal {
  4. constructor (name : string) {
  5. super(name);
  6. this.type = 'cat';
  7. }
  8. greet() {
  9. return super.greet()+" and I don't like you";
  10. }
  11. }