Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Framasoft
PeerTube
PeerTube
Commits
841cb202
Verified
Commit
841cb202
authored
Jan 24, 2023
by
Chocobozzz
Browse files
Type isPromise
parent
8ca52bcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
shared/core-utils/common/promises.ts
View file @
841cb202
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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment