Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

injectable

import { injectable } from "https://raw.githubusercontent.com/drmercer/minimal-injector/master/injector.ts";

Creates a new injectable (a "module" or "component" that can be obtained from an Injector), returning a new InjectKey that maps to that injectable.

function injectable<T>(factory: (inject: Injector) => T): InjectKey<T>;
§
injectable<T>(factory: (inject: Injector) => T): InjectKey<T>
[src]

§Type Parameters

§Parameters

§
factory: (inject: Injector) => T
[src]

The factory function that is invoked to create the value. The first parameter is an Injector that can be used to get the values of other injectables.

§Return Type

§

The InjectKey corresponding to the new injectable.