Class

InjectablesRegistry

InjectablesRegistry()

Constructor

# new InjectablesRegistry()

Extends the base injectable registry to provide automatic repository resolution for models.

Registry for injectable repositories.

Parameters:
Type Description
void

No constructor parameters required.

View Source repository/injectables.ts, line 8

Example
const registry = new InjectablesRegistry();
const userRepo = registry.get<UserRepository>('User');
// If UserRepository exists, it will be returned
// If not, but User model exists, a repository will be created for it

Methods

# get(name) → {T|undefined}

Extends the base get method to automatically resolve repositories for models when not found directly.

Gets an injectable by name with repository auto-resolution.

Parameters:
Name Type Description
name string

The name of the injectable to retrieve.

View Source repository/injectables.ts, line 68

  • The injectable instance or undefined if not found.
T | undefined