April 2018
Beginner
536 pages
13h 21m
English
The main.ts file is the application's entry point. It creates an instance of Katana and an instance of Ninja and then invokes one of the methods of the Ninja instance:
import { Ninja } from "./ninja";
import { Katana } from "./katana";
const ninja = new Ninja(new Katana());
ninja.fight(5);