• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import Animal from '.';
2import { makeRandomName } from '../core/utilities';
3
4export interface Dog extends Animal {
5    woof(): void;
6    name: string;
7}
8
9export function createDog(): Dog {
10    return ({
11        size: "medium",
12        woof: function(this: Dog) {
13            console.log(`${this.name} says "Woof"!`);
14        },
15        name: makeRandomName()
16    });
17}
18
19