Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

derw

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derw

An Elm-inspired language that transpiles to TypeScript

  • 0.0.11-0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

derw

Welcome to Derw! Derw is a type-safe language in the ML family designed to replace or augment your TypeScript and JavaScript code - both on the client and the server. If you've never encountered an ML language before, some of the core principles - which Derw follows - is a clean and concise syntax, paired with a powerful type system. Here's some real world Derw code:

generateTypeAlias: TypeAlias -> string
generateTypeAlias syntax =
    let
        properties: string
        properties =
            List.map generateProperty syntax.properties
                |> (\y -> y.join ",\n    ")

        typeDef: string
        typeDef =
            generateType syntax.type
    in
        if syntax.properties.length == 0 then
            `type alias ${typeDef} = {\n}`
        else
            `type alias ${typeDef} = {\n    ${properties}\n}`

Why might you use Derw?

Derw is a language for those searching for a better syntax for writing type-heavy code. It is a general purpose language, for both the server and the client, built on top of the JavaScript platform. It has interop with Javascript and TypeScript built in - so that you can use existing code and libraries with minimal effort. Derw targets multiple languages - TypeScript, JavaScript, Elm, English and Derw itself. Derw's output generation is documented in the Gitbook, so it's easy to create code to interface between Derw and TypeScript.

If you want to write a website, both backend and frontend, Derw is a perfect choice for you.

Batteries built-in

  • A testing framework (all of Derw's compiler tests use this library!)
  • Performant web framework with server side rendering and hydration
  • Bundling built into the CLI
  • Write better code by leveraging a type system that guides your code.
  • Integrate with your existing code bases through interop with JavaScript and TypeScript.

Getting Started

Head over to the Gitbook.

Staying up to date

Homepage: https://www.derw-lang.com/

Blog: http://derw.substack.com/

Follow Derw on Twitter: https://twitter.com/derwlang

Name

derw (/ˈdeːruː/, Welsh “oak”) is one of the native trees in Wales, famous for long life, tall stature, and hard, good quality wood. An English speaker might pronounce it as “deh-ru”.

Keywords

FAQs

Package last updated on 29 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc