UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

5 lines (3 loc) 223 B
type MaybeReturnType<T> = T extends (...args: any) => any ? ReturnType<T> : T; declare function callOrReturn<T>(value: T, context?: any, ...props: any[]): MaybeReturnType<T>; export { type MaybeReturnType, callOrReturn };