Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
46693c4bef | |||
cd7361bb96 | |||
d3b4a252e9 | |||
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 anotherPluginLazy = new LazyModule<typeof _anotherPlugin>('anotherPlugin')
|
||||||
|
|
||||||
myPluginLazy.whenLoaded.then(myPlugin => {
|
myPluginLazy.whenLoaded.then(myPlugin => {
|
||||||
/* do something with myPlugin.
|
/* do something with myPlugin.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartsystem",
|
"name": "smartsystem",
|
||||||
"version": "1.0.2",
|
"version": "1.0.4",
|
||||||
"description": "wraps systemjs for smarter workflows",
|
"description": "wraps systemjs for smarter workflows",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user