Bundle all `resolve`d Promise data
jeremyckahn opened this issue · 0 comments
jeremyckahn commented
Currently, resolve
d Promise
data is spread across formal parameters:
Line 490 in ed1504c
It should be bundled into the first argument so that it can accessed via await
. Additionally, the Tweenable
instance should be provided to resolve
. Theoretically, along with #118, this code would be possible with this change:
const run = async () => {
let { tweenable } = await tween({
easing: "easeInOutQuad",
duration: 500,
step: ({ x }) => {
div.style.transform = `translateX(${x}%)`;
},
from: { x: 0 },
to: { x: 300 }
});
{ tweenable } = await tweenable.tween({
to: { x: 0 }
});
await tweenable.tween({
to: { x: 100 }
});
};