Promise type judgment

var fun = ()=>{
    return new Promise((resolve,reject) => {
        resolve(1)
    })
}

how can I tell that fun () is a Promise object without running fun and cannot modify the fun function?

May.22,2021

does not execute the function, how is it possible to know what type of return value it is? it is not that java or cPP, can declare the return value of the function in advance


Promise itself to determine whether the return value is Promise by judging whether there is a then
if something looks like a duck and tastes like a duck, then he is a duck

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a52a-2af49.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a52a-2af49.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?