export function isPromise<T = any>(val: unknown): val is Promise<T> {
  return !!val && typeof (val as Promise<T>).then === "function";
}

export function isFunction<T = any>(val: unknown): val is (...args: any[]) => T {
  return typeof val === "function";
}
