@lppedd/di-wise-neo - v0.19.0
    Preparing search index...

    Variable Injector

    Injector: Type<Injector>

    Allows performing injections outside the normal injection context window.

    class Wizard {
    private injector = inject(Injector);

    // Lazily initialize the wand property
    private wand?: Wand;

    getWand(): Wand {
    // An injection context does not exist here, but the
    // Injector instance retains and reuse the context
    // that was present at the time of its injection
    return (this.wand ??= this.injector.inject(Wand));
    }
    }