Almost all definition files so readily available you know where, do a declare module or declare var. Isn't this a huge problem? If I forget to import an implementation of a declared module and then use it, compiler will never give me an error, but the app will crash horribly at run time.
One way I see how to solve this is to write definition files only with a declare module "topLevelName", so you can't accidentally use it without requiring it first. But this creates a problem for things such as jQuery, because people tend to not require it but just put it into global context. In this case current approach is actually working correctly.
I just can't seem to wrap my head around this huge limitation of the system. Am I missing something?
a.tsandb.ts, but the page contains only<script src="a.js"></script>.