Verified Commit 841cb202 authored by Chocobozzz's avatar Chocobozzz
Browse files

Type isPromise

parent 8ca52bcc
function isPromise (value: any) {
return value && typeof value.then === 'function'
function isPromise <T = unknown> (value: T | Promise<T>): value is Promise<T> {
return value && typeof (value as Promise<T>).then === 'function'
function isCatchable (value: any) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment