UNPKG

power-di

Version:

A lightweight Dependency Injection library. Using es6 and other features, remove unnecessary concepts, easy and convenient to use.

7 lines (6 loc) 286 B
export type ClassType = Function | (new (...args: any[]) => any); export type KeyType = ClassType | Symbol | string; export type RegKeyType = KeyType | undefined; export type GetReturnType<T, ClsType> = T extends undefined ? ClsType extends { prototype: infer R; } ? R : never : T;