type (type.html)
Add a new service, defined as a Type to instantiated, to the package
Params
-
ServiceTypeOrName { function(),string } - If a string then this is the name of the service, otherwise it is assumed to be the
`ServiceType`.
-
ServiceType { function } - The constructor function that will be used by the injector to create the processor. The function
must not be anonymous - it must have a name, e.g. `function MyType() { ... }` - since the name of
the service is taken from the name of the constructor function.
Returns
{ Package } - "This" package, to allow methods to be chained.