turtle icon indicating copy to clipboard operation
turtle copied to clipboard

Support Promises in iopipe.define()

Open ewindisch opened this issue 9 years ago • 2 comments

Users would like to return a promise from functions passed to iopipe.define

Dustin Getz @dustingetz Jul 02 14:16
hey guys cool project
I thought aws lambda can't do async or state, i thought you just had to compute something and return a value, am i confused?
let inc = (e,c)=>resovledPromise(e.count+1)
iopipe.define(inc, inc, inc)
is this possible to express?
with async types
i now see it can here: https://github.com/iopipe/dockaless-examples/blob/master/functions/urls-ffmpeg-resize/index.js

ewindisch avatar Jul 04 '16 14:07 ewindisch

WIP tree: https://github.com/ewindisch/iopipe/tree/i_promise_you

ewindisch avatar Jul 08 '16 15:07 ewindisch

/cc @dustingetz (requested this via gitter.im)

ewindisch avatar Jul 08 '16 17:07 ewindisch