UNPKG

293 BTypeScriptView Raw
1import { AnyArray } from "../any-array";
2import { AnyFunction } from "../any-function";
3import { Primitive } from "../primitive";
4export type ValueOf<Type> = Type extends Primitive ? Type : Type extends AnyArray ? Type[number] : Type extends AnyFunction ? ReturnType<Type> : Type[keyof Type];