TypeScript - Polymorphic This Type
Channel: ProgramArtist
Date: 2017-08-05

In this episode I talk about the Polymorphic This Type in TypeScript.

00:06 What is polymorphism?
Problem buildup:
00:20 Creating a StringBuilder class
02:04 Method chaining for a class
03:34 Extending StringBuilder with ObjectStringBuilder
04:57 Method chaining with extended methods
05:43 The problem
06:11 Solving the problem with polymorphic this type
07:57 Small bug fix

You can see all the code here:
https://github.com/slavik57/typescript-playground

Learn TypeScript:
https://www.youtube.com/playlist?list=PLtm06noQc9vmfoC4U0w90HTIRzpVKeXlC