Resolver

Resolver

Represents a dependency resolver.
Members

Methods

Constructor

new Resolver(storage)

Creates a new instance of Namespace.
Parameters
Name Type Description
storage Module's storage.

Methods

resolve(fullPath) → {any}

Resolves a module by given full path.
Parameters
Name Type Description
fullPath string Full path of a module.
Returns
Value of resolved module.
Type
any

resolveAll(namespace, nestedopt) → {Map.<string, (any|Array.<any>)>}

Resolves all modules by a given namespace name.
Parameters
Name Type Attributes Default Description
namespace string Target namespace name.
nested boolean <optional>
false Value that detects whether it needs to resolve modules from nested namespaces. If 'true', all resolved values will be put into an array.
Returns
Map of module values, where key is a module name.
Type
Map.<string, (any|Array.<any>)>