class CircularDetector
Since 0.1.0

Detects circular dependencies during container resolution.

Maintains an ordered stack (for readable error messages) and a set (for O(1) membership checks).

Properties

readonly
isActive: boolean

Reports whether any tokens are currently being resolved.

Methods

enter(token: string): void

Marks a token as currently being resolved.

leave(): void

Removes the most recently entered token from the resolution chain.

Usage

import { CircularDetector } from "di-plugin/src/index.ts";