In my current setup using Ionic 3 (Angular 5), I have noticed that specifying the type of a variable or function doesn't seem to have any impact on the functionality. It behaves just like it would in plain JavaScript, with no errors being generated. I'm wondering if there is a specific configuration file, such as tsconfig.json, that needs to be adjusted or if there is something that I am overlooking. An example of what I'm experiencing:
foo : string;
foo = someObject as SomeNonExistentClass;
One interesting observation is that when I use 'ionic serve', the errors are displayed correctly but upon saving one of the affected files, all the errors disappear. This issue seems to occur sporadically during a save/recompile process.