getMyFunction
returns a function that returns a promise, so you need to call myFunction
to get the promise:
const myFunction = getMyFunction('a');
Promise.all([
myFunction(), // <-- note here
]).then((result) => {
console.log('result: ', result);
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…