Home > typeioc > IRegistration > asType
Sets registration to be marked as type registration
Signature:
asType(type: T, ...params: any[]): IRegisterWithAs<T>;
Parameter | Type | Description |
---|---|---|
type | T |
type representative to be used for the instance construction |
params | any[] |
optional array of parameters to be used for the type instance construction |
Returns:
IRegisterWithAs<T>
Registration is provided as a type. An instance of the type is instantiated during resolution. It is intended for construct-able types only. Uses new operator for type construction