Visual Studio TypeScript error "Unable to compile modules if the" -module "flag is not specified.
Right-click the project and select "Properties." Click on the TypeScript page in the project properties, and then select your module (I personally recommend commonjs with webpack for an interface / browser or as for nodejs)
source share