(data: Fulfilled<T> | Rejected)
| 56 | }) |
| 57 | |
| 58 | function finalize(data: Fulfilled<T> | Rejected) { |
| 59 | Object.assign(thenable, data) |
| 60 | |
| 61 | // clear pending props props to avoid calling them twice |
| 62 | delete (thenable as Partial<PendingThenable<T>>).resolve |
| 63 | delete (thenable as Partial<PendingThenable<T>>).reject |
| 64 | } |
| 65 | |
| 66 | thenable.resolve = (value) => { |
| 67 | finalize({ |