Alias Decorator

Giving an alias name to a module allows us to access this module by an alternate name. In Injex, sharing an alias name between modules will create an injectable group as a map into your modules, as described in the @injectAlias() section.


You add an alias name to a module by decorating its class with the @alias(NAME,...) decorator. Each module can have more than one alias name if you like, by providing a list of names as the decorator arguments.

import { define, alias } from "@injex/core";
export class GoogleMailProvider {