Urgent.News

What's breaking now, across thousands of outlets.

Tech

Use this PIPE to feel the FLOW

A proof-of-concept TypeScript compiler with a pipeline operator. npm install -D @pengeszikra/typescript@next I’d like you to experience the same flow I discovered about five years ago, when I had the chance to use the pipeline operator in a React project. Back then, I was really into functional programming, especially the idea of building more complex workflows from small functions. With the…

A TypeScript compiler with a pipeline operator is now available as a proof-of-concept. npm install -D @pengeszikra/typescript@next allows developers to try the new syntax and experiment with the programming style. The pipeline operator offers a more natural flow by processing data from left to right, making it easier to read and understand compared to traditional function composition.

Each stage in the pipeline receives the output of the previous stage, and TypeScript ensures type compatibility. The compiler supports both .ts and .tsx files, allowing for independent, reusable, and testable functions. To try the experimental compiler, install @pengeszikra/typescript@next, and use the tspipe command to compile the new syntax to JavaScript.

Experimentation is encouraged, as feedback on the syntax, readability, and potential bugs is valuable for improving the feature.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

When there is no rule, the answer is no

When an AI agent asks Verax for something there is no rule for, the answer is no. Nothing is allowed by default. That covers the obvious case, like an agent trying to export your customer list.

More from Wednesday 30 September →