docs: improve promise terminology
This is kind of a nit but:
A promise is:
-
resolved if its fate is known either because it is tracking another promise or because it is fulfilled with a value. For example
const p = Promise.resolve(timersPromises.setTimeout(1000));
- herep
is a resolved promise. The promise constructor calls its executor argument functionresolve
for this case since it performs resolution and you can pass it a promise and it'll track it. -
fulfilled means what the docs mean when they use "resolved". It means "this promise has settled on a value successfully".
p
for the example above has not fulfilled (immediately).