Thiago Arrais a4170b5e32 Transform for F# Pipeline (#9984)
* Transform for F#-style await

Inludes support for optimizing single-parameter arrow functions

* Wait until optimization before pushing placeholder into scope
2019-06-30 12:53:22 +02:00

14 lines
212 B
JavaScript

const triple = (x) => x * 3;
async function myFunction(n) {
return n
|> Math.abs
|> Promise.resolve
|> await
|> triple;
}
return myFunction(-7).then(result => {
expect(result).toBe(21);
});