Import a module for side-effects only

Import a module for side-effects only

Though not recommended practice, some modules set up some global state that can be used by other modules. These modules may not have any exports, or the consumer is not interested in any of their exports. To import these modules, use:

import "./my-module.js";
doc_TypeScript
2016-10-04 19:25:17
Comments
Leave a Comment

Please login to continue.