Home > typeioc > IRegisterWithAs
Represents an entry step within registration fluent cascading API sequence
Signature:
export interface IRegisterWithAs<T>
Method | Description |
---|---|
dispose(action) | Specifies disposer action during resolution disposal. |
initializeBy(action) | Specifies initialization action during service instantiation |
instancePerContainer() | Specifies instance per container scope resolution. Every resolution of a service returns the same instance per instance of a container Is similar to scope.container scope |
lazy() | Specifies lazy registration. Resolution of services is differed until results are needed by other services/computations |
named(name) | Specifies named registration. Registration can be resolved only using the name provided |
singleton() | Specifies singleton scope resolution. Every resolution of service returns same instance Is similar to scope.hierarchy scope |
transient() | Specifies transient scope resolution. Every resolution of service returns new instance Is similar to scope.none ScopeType (default behavior) |
within(scope) | Specifies resolution instance scope. Scope determines how resolved service instances behave in between resolutions |