getModule<T extends EasyModule> method

  1. @internal
  2. @Deprecated('Use EasyDI.getModule instead')
T? getModule<T extends EasyModule>()

Gets a module instance of type T if it exists.

Returns null if the module is not found. If the module exists but its injector hasn't been committed yet, this method will commit it before returning.

Note: This method is internal and should not be used outside the module manager. Use Module.get instead to retrieve dependencies.

Implementation

@internal
@Deprecated('Use EasyDI.getModule instead')
T? getModule<T extends EasyModule>() => EasyDI.getModule<T>();