codemodsquad/asyncify

better option to not convert short chains to IIAAFs

jedwards1211 opened this issue · 3 comments

Cases like

const promises = Promise.all([
  user.update().then(() => user.reload()),
  post.update().then(() => post.reload()),
])

Would be better left alone since they become messy when converted to IIAAFs

papb commented

What's an IIAAF? 🤔

Immediately invoked async arrow function 😅
(async () => ...)()

I forgot, this is more or less fixed, it no longer converts chains of length 2 or less where the handlers are arrow function expressions