· via Hacker News – Front Page (hnrss.org)
Civet, a TypeScript superset with CoffeeScript-style syntax, reaches Hacker News front page
Civet, an open-source language by DanielXMoore, compiles a CoffeeScript-flavored superset of TypeScript back into plain TS and ships plugins for most JS build tools; it reached Hacker News' front page on 28 November 2026.
A project called Civet landed on the front page of Hacker News on 28 November 2026, according to the site's RSS listing, which links directly to the project's GitHub repository. Civet, by developer DanielXMoore, is a language that sits on top of TypeScript: you write in its terser syntax and it compiles back down to ordinary TypeScript. The project's pitch, per its README, is that you keep the type system while cutting the keystrokes and ceremony around it.
What the language adds
The README sorts Civet's features into a few groups. The headline items are implementations of ECMAScript features that are still at the proposal stage: a pipe operator modeled on F#, Hack pipes and the current TC39 proposal, so data |> Object.keys |> console.log is valid Civet, and pattern matching inside switch, also based on the TC39 draft.
Alongside those sit a stack of shorthands with clear CoffeeScript, Ruby and Crystal lineage. := declares a const and .= declares a let, with typed variants available, and := also doubles as a readonly class field initializer. A short-function syntax the docs credit to Ruby's symbol-to-proc, Crystal and Elm record access lets x.map &.name stand in for x.map(a => a.name), extending to nested access, calls and unary or binary operators. Object literals get abbreviations such as {props.foo} for {foo: props.foo}, data.{x,y} for pulling several properties at once, and LiveScript-style flags like {+debug, -live, !verbose} that expand to boolean values. Do expressions, if and for expressions, custom infix operators built from any two-argument function, dedented triple-backtick template strings and import/export shorthands round out the list. Functions also return their final expression implicitly, even across multiple statements, with opt-outs including a void return type, a trailing semicolon, an explicit return, or a per-file directive.
JSX and TypeScript-specific changes
JSX receives the most visible rework. Children can be indented instead of wrapped in closing tags, #foo sets an id and .foo sets a class, attribute values can drop their braces in unambiguous cases, and +foo or -foo set boolean props. Framework-specific directives adjust the dialect: a React mode emits className rather than class, while Solid modes add typed JSX with separate client, server and isomorphic settings.
On the TypeScript side, Civet rewrites .mts and .cts extensions to .js in imports to work around a long-standing TypeScript issue the README references by number. It also lists ideas at various stages, including typed destructuring, dot notation for types and module interfaces.
Where it deliberately diverges
Civet is not purely additive, and the documentation is upfront about the departures. Single-argument arrows must use parentheses, the comma operator is banned in conditionals, when inside a switch implicitly breaks, and words like and, or, loop, until and unless are reserved. Decorators use @@ because @ is repurposed for this access and class members. Some grammar corners get subtle: a: number = 5 parses as an object literal, so a typed mutable binding needs the .= form, and whitespace is required before a ternary ? because a postfix ? is the existential operator. Directives can toggle many of these choices, which the README frames as Civet being a configurable family of dialects rather than one fixed language.
Tooling and integration
The CLI installs globally from npm, offers a REPL, compiles .civet sources to TypeScript, and can type-check an entire project via civet --typecheck when TypeScript is installed; Node can execute .civet files directly through a register hook. The plugin coverage is the project's most practical asset: Vite, esbuild, Astro, Farm, Rolldown, Rollup, Webpack, Babel, Jest, Gulp and Bun are all supported, alongside ESM and CommonJS loaders, a script-tag mode, a VSCode extension, a browser playground and starter templates for Solid. The README also carries a detailed comparison against CoffeeScript.
Why it matters
Civet's clearest precedent is CoffeeScript, whose most convenient ideas, such as arrow functions and destructuring, were eventually absorbed into ECMAScript itself. Civet works that lineage from the other direction: it lets developers use pending TC39 features like pipes and pattern matching today, while emitting TypeScript that any existing project can already build and type-check. Compiling to TS rather than straight to JavaScript is the consequential design choice, because it keeps the standard TypeScript compiler as the gatekeeper and makes the new layer optional in principle.
The trade-offs are the familiar ones for any syntax layer: one more translation step, debugging against generated code, and the cost of onboarding a team onto a dialect. But the unusually broad build-tool support lowers the mechanical barrier to trying it, and the front-page attention on Hacker News suggests that appetite for ergonomics experiments on top of TypeScript has not gone away.
- #typescript
- #programming-languages
- #developer-tools
- #open-source
- #transpilers