3 ms·
Well, an object with a then() method is a promise. Promise.resolve({then: () => console.log('called')}) Promises autoflatten since you can't have Promise<Prom
by hombre_fatal 7y ago
Well, an object with a then() method is a promise.
Promise.resolve({then: () => console.log('called')})
Promises autoflatten since you can't have Promise<Promise<T>>, so you'll see that this code prints 'called'.