Thrown when a service was registered with the wrong number of constructor arguments.

Example

class Database {
constructor(public logger: LoggerService);
}

// container.register(Database, [LoggerService]); // OK!

container.register(Database, []); // Error: Database requires 1 argument

Hierarchy

  • Error
    • ArgumentCountError

Properties

prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

stackTraceLimit: number
cause?: unknown
name: string
message: string
stack?: string

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc