@surface/dependency-injection
Version:
Provides dependency injection capabilities.
9 lines (8 loc) • 409 B
TypeScript
import type { Key } from "../types/index.js";
/**
* Injects dependencies resolved by active container.
* Can be used on constructor parameters or properties.
* Note that when using property injection, injection occurs after instantiation. Therefore the values will not be available in the constructor.
* @param key Key used to resolve instance.
**/
export default function inject(key: Key): any;