Closed
Description
A lot of type definitions in DefinatelyType export CommonJS module types and a global type definition for popular libraries. I.E Jquery can be used directly from the window object but also using the require syntax.
But this causes Typescript to accept faulty code as correct. E.g using $ or jQuery directly in a commonjs module without requiring the module itself is compiled correctly, when in the first place it was a bug not to require the module.
So can there be a flag where if commonjs modules is enabled then global types are not supported, and only types exported through a module name?