import _ = require ( './lodash' ) ; var Generator ; class GeneratorService { public start ( prefix ? , cwd ? , options ? ) { if ( ! Generator ) Generator = require ( './generator' ) ; return new Promise ( ( resolve ) => { _ . defer ( ( ) => new Generator ( prefix , cwd , options ) . start ( ) . then ( resolve ) ) ; } ) ; } public run ( generator , cwd ? , options ? ) { if ( ! Generator ) Generator = require ( './generator' ) ; return new Promise < IMessages > ( ( resolve ) => { _ . defer ( ( ) => new Generator ( undefined , undefined , options ) . run ( generator , cwd ) . then ( resolve ) ) ; } ) ; } public list ( prefix , cwd ? , options ? ) { if ( ! Generator ) Generator = require ( './generator' ) ; return new Promise < IMessages > ( resolve => { _ . defer ( ( ) => new Generator ( prefix , cwd , options ) . listGenerators ( cwd ) . then ( resolve ) ) ; } ) ; } } export = GeneratorService ;