       catch error then done error
 
   class Component
-    dependencies: undefined
-    factory: undefined
-
-    constructor: (properties = {}) ->
-      @[key] = val for own key,val of properties
-
-      @dependencies ?= []
-      @factory ?= null
+
+    constructor: (properties = {}) ->
+      _dependencies = properties.dependencies?.slice() ? []
+      _factory = properties.factory
+
+      $.defineProperties @,
+        dependencies:
+          enumerable: true, get: -> _dependencies.slice()
+        factory:
+          enumerable: true, get: -> _factory
 
     resolveDependencies: (container, done) ->
       resolveComponent = container.resolveComponent.bind container

  class Promises extends Dictionary

  class Container
    components: undefined
    promises: undefined

    constructor: (properties = {}) ->
      @[key] = val for own key,val of properties

      @components ?= new Components
      @promises ?= new Promises

    createComponentPromise: (name) ->
      $.createPromise (resolve, reject) =>

    configure: configure
    Configuration: Configuration
    CustomError: CustomError
    ComponentCyclic: ComponentCyclic
    ComponentDependenciesUndefined: ComponentDependenciesUndefined
    ComponentUndefined: ComponentUndefined
    Component: Component
    Components: Components
    Container: Container
    Dictionary: Dictionary
    DictionaryEvent: DictionaryEvent
    DictionaryValueSet: DictionaryValueSet
    DictionaryValueRemoved: DictionaryValueRemoved
    Promises: Promises

module.exports = configure()
