July 2019
Intermediate to advanced
416 pages
10h 6m
English
class Converter { Convert(temperature : number, converter : FahrenheitToCelsius | CelsiusToFahrenheit) : number { return converter.Convert(temperature); }}let converter = new Converter();console.log(converter.Convert(32, new CelsiusToFahrenheit()));
class Commands { private commands = new Map<string, Command>(); public Add(...commands : Command[]) { commands.forEach(command => { this.Add(command); }) } public Add(command : Command) { this.commands.set(command.Name, command); }}let command = new Commands(); ...Read now
Unlock full access