From a607cb435cc21717af3f62b14292835ea89082be Mon Sep 17 00:00:00 2001 From: Jannis Jorre Date: Mon, 1 Apr 2019 11:15:04 +0200 Subject: [PATCH] Fix missing parenthesis for returning object As the core proposal specifies, returning an object in a pipeline needs to be surrounded with parenthesis, to ensure forward compatibility with [Additional Feature BP](https://github.com/js-choi/proposal-smart-pipelines/blob/master/additional-feature-bp.md). --- additional-feature-ts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/additional-feature-ts.md b/additional-feature-ts.md index bda31e3..5308b3f 100644 --- a/additional-feature-ts.md +++ b/additional-feature-ts.md @@ -241,7 +241,7 @@ value |> f |> { try |> JSON.parse; - catch |> { message: #.message }; + catch |> ({ message: #.message }); } |> g(#, 1); ``` @@ -496,4 +496,4 @@ g (_1, 1); [WHATWG-stream piping]: https://streams.spec.whatwg.org/#pipe-chains [Wikipedia: term rewriting]: https://en.wikipedia.org/wiki/Term_rewriting [zero runtime cost]: ./goals.md#zero-runtime-cost - \ No newline at end of file +