- Unwraps Action.handle result in Action.invoke
import { Vla } from 'vla'
class ActionPacked extends Vla.Action {
async handle() {
await wait(100)
return { success: true }
}
}
// Before: nested promise 🥺
const result = ActionPacked.invoke()
// ^^^^^^
// const result: Promise<Promise<{
// success: boolean;
// }>>
// After: flattened promise 📈
const result = ActionPacked.invoke()
// ^^^^^^
// const result: Promise<{
// success: boolean;
// }>Full Changelog: v0.2.0...v0.2.1