before(promise)
promise<Promise>
在 promise 的后续操作执行之前被调用。这可以是 then()、catch() 或 finally() 处理函数的形式,也可以是 await 恢复的形式。
【Called before a promise continuation executes. This can be in the form of
then(), catch(), or finally() handlers or an await resuming.】
before 回调将被调用 0 到 N 次。如果从未对该 promise 进行过任何延续,before 回调通常会被调用 0 次。在同一个 promise 被多次延续的情况下,before 回调可能会被调用多次。
【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.】