improve README
This commit is contained in:
parent
193bf8f891
commit
abc9e7888e
@ -23,11 +23,11 @@ We recommend the use of TypeScript for best Intellisense
|
|||||||
```typescript
|
```typescript
|
||||||
import { LazyModule } from 'smartsystem'
|
import { LazyModule } from 'smartsystem'
|
||||||
|
|
||||||
import * as myPluginType from 'myPlugin' // plugin does not get loaded here at runtime
|
import * as _myPlugin from 'myPlugin' // plugin does not get loaded here at runtime
|
||||||
let myPluginLazy = new LazyModule<typeof myPlugin>('myPlugin')
|
let myPluginLazy = new LazyModule<typeof _myPlugin>('myPlugin')
|
||||||
|
|
||||||
import * as anotherPluginType from 'anotherPlugin' // plugin does not get loaded here at runtime
|
import * as _anotherPlugin from 'anotherPlugin' // plugin does not get loaded here at runtime
|
||||||
let anotherPluginPromised = LazyModule<typeof anotherPlugin>('anotherPlugin')
|
let anotherPluginPromised = LazyModule<typeof _anotherPlugin>('anotherPlugin')
|
||||||
|
|
||||||
myPluginLazy.whenLoaded.then(myPlugin => {
|
myPluginLazy.whenLoaded.then(myPlugin => {
|
||||||
/* do something with myPlugin.
|
/* do something with myPlugin.
|
||||||
|
Loading…
Reference in New Issue
Block a user