f97c97f41a6b6a00e14a34f770eed7e229adf867
				
			
			
		
	smartsystem
simplifies lazy loading with TypeScript
Availabililty
Status for master
Usage
We recommend the use of TypeScript for best Intellisense
import { LazyModule } from 'smartsystem'
import * as myPluginType from 'myPlugin' // plugin does not get loaded here at runtime
let myPluginLazy = new LazyModule<typeof myPlugin>('myPlugin')
import * as anotherPluginType from 'anotherPlugin' // plugin does not get loaded here at runtime
let anotherPluginPromised = LazyModule<typeof anotherPlugin>('anotherPlugin')
myPluginLazy.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 */
})
myPluginLazy.load().then(myPlugin => {
    /* do something with myPlugin. 
       myPlugin receives the typings flow from LazyModule class
       This DOES LOAD the module */
})
Description
				A TypeScript library for interacting with the system it's running on, including environment, network, and hardware information.
						
						
						
					Languages
				
				
								
								
									TypeScript
								
								100%