UNPKG

ts-type

Version:

add some typescript type and re-export some build-in typescript type

4 lines (3 loc) 220 B
import { ITSAnyFunction } from '../type/base'; export type ITSAwaitedLazy<T> = T extends PromiseLike<infer U> ? Awaited<U> : T; export type ITSAwaitedReturnType<T extends ITSAnyFunction> = ITSAwaitedLazy<ReturnType<T>>;