before(promise)


在 promise 继续执行之前调用。 这可以是 then()catch()finally() 句柄或 await 恢复的形式。

before 回调将被调用 0 到 N 次。 如果 promise 没有继续进行,则 before 回调通常会被调用 0 次。 before 回调可能会在同一个 promise 进行了许多继续的情况下被多次调用。

Called before a promise continuation executes. This can be in the form of then(), catch(), or finally() handlers or an await resuming.

The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. The before callback may be called many times in the case where many continuations have been made from the same promise.