Glad it worked! I think it's a failure by the TypeScript team to not make this flow more front and center.
You are right, I forgot about installing typings. Instead of require you should use ES6 "import" (which TS compiles to require anyway) to get more type checking. But when you do that you'll see more of my missed step, which is `npm install @types/XYZ` for each XYZ package you use.
As soon as you start introducing a separate build tool (like gulp or whatever) things get super messy super fast but not for any interesting reason. Using `tsc --watch` also means it does caching across builds so it's faster than using gulp unless you're careful to configure it.
This advice is gold, thanks. But what I'm finding is that it's too painful to create a TypeScript project that has both a front-end and a back-end by incrementally building it like this, unless the front-end is just a set of static files with no compilation steps.
You are right, I forgot about installing typings. Instead of require you should use ES6 "import" (which TS compiles to require anyway) to get more type checking. But when you do that you'll see more of my missed step, which is `npm install @types/XYZ` for each XYZ package you use.
As soon as you start introducing a separate build tool (like gulp or whatever) things get super messy super fast but not for any interesting reason. Using `tsc --watch` also means it does caching across builds so it's faster than using gulp unless you're careful to configure it.