I am trying to make use of the type declarations files in the DefinitelyTyped repository. Many of these files use the following pattern:
export = React;
export as namespace React;
Googling around, I've found references to this being used to make a declaration file usable in both module-based and non-module-based systems. However, I'm struggling to find a clear explanation of:
- what each of these lines exactly does individually and
- how exactly this combination works to support both types of consumers.