mariocasciaro / scatter

IoC container and out-of-the-box extensibility for Node.js applications
MIT License
154 stars 14 forks source link

Is it possible to load modules without Promise? (Synchronously?) #36

Closed nerdpad closed 8 years ago

nerdpad commented 8 years ago

Instead of returning Promise, is it possible to get the resolved module synchronously?

mariocasciaro commented 8 years ago

Unfortunately no, dependencies are always resolved asynchronously, this is because Scatter supports async module initialization. Even if just 1 module is initialized asynchronously the API itself has to always behave asynchronously.