typeioc

Home > typeioc > IRegistration > asType

IRegistration.asType() method

Sets registration to be marked as type registration

Signature:

asType(type: T, ...params: any[]): IRegisterWithAs<T>;

Parameters

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>

Remarks

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