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

InjectedValue

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

A utility type that evaluates to the "T" given an InjectKey. This allows you to do things like:

export type Foo = InjectedValue<typeof Foo>; // resolves to { foo(): void, bar(): void }

export const Foo = injectable(() => {
  return {
    foo() {
      console.log("foo");
    },
    bar() {
      console.log("bar");
    },
  };
}})
type InjectedValue<K extends InjectKey<unknown>> = K extends InjectKey<infer T> ? T : never;

§Type Parameters

§
K extends InjectKey<unknown>
[src]

§Type

§
K extends InjectKey<infer T> ? T : never
[src]