refactor: don't expose isPromise as an internal module (#19139)
This commit is contained in:
parent
949f8685d2
commit
69369cf365
6 changed files with 9 additions and 19 deletions
12
lib/common/is-promise.ts
Normal file
12
lib/common/is-promise.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
export function isPromise (val: any) {
|
||||
return (
|
||||
val &&
|
||||
val.then &&
|
||||
val.then instanceof Function &&
|
||||
val.constructor &&
|
||||
val.constructor.reject &&
|
||||
val.constructor.reject instanceof Function &&
|
||||
val.constructor.resolve &&
|
||||
val.constructor.resolve instanceof Function
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue