fix(core): update
This commit is contained in:
@@ -47,14 +47,14 @@ import * as _anotherPlugin from 'anotherPlugin'; // plugin does not get loaded h
|
||||
// define lazy module
|
||||
let anotherLazyModule = new LazyModule() < typeof _anotherPlugin > ('anotherPlugin', __dirname);
|
||||
|
||||
myLazyModule.whenLoaded.then(myPlugin => {
|
||||
myLazyModule.whenLoaded.then((myPlugin) => {
|
||||
/* do something with myPlugin.
|
||||
myPlugin receives the typings flow from LazyModule class
|
||||
This does NOT load the module during runtime
|
||||
The promise whenLoaded will be resolved whenever load() is called for the first time */
|
||||
});
|
||||
|
||||
myLazyModule.load().then(myPlugin => {
|
||||
myLazyModule.load().then((myPlugin) => {
|
||||
/* do something with myPlugin.
|
||||
myPlugin receives the typings flow from LazyModule class
|
||||
This DOES LOAD the module */
|
||||
|
Reference in New Issue
Block a user