Some functions may have different return types depending on the types of the arguments with which they’re invoked. Using TypeScript’s function overloads, you can create an overload for each allowed combination of parameter and return types. This way, all type-correct signatures of a function are encoded in the type system and can be surfaced by the TypeScript Language Service within your editor.
Without the "target": "es2015" compiler option that example isnt working for me. Guess you forgot to mention that. Nice course man.
Also, vscode still complains for me (even though the code compiles) after I added the es2015 target.