Popularity
1.6
Declining
Activity
0.0
Stable
0
3
0

Monthly Downloads: 5
Programming language: Haskell
License: GNU General Public License v3.0 only
Tags: Language    

haskell-typescript alternatives and similar packages

Based on the "Language" category.
Alternatively, view haskell-typescript alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of haskell-typescript or a related project?

Add another 'Language' Package

README

Haskell-TypeScript

Simple Haskell bindings to the TypeScript compiler, pull requests welcome

cabal update && cabal install haskell-typescript
cat examples/test.ts
interface Person {
    firstname: string;
    lastname: string;
}

function greeter(person : Person) {
    return "Hello, " + person.firstname + " " + person.lastname;
}

var user = {firstname: "Jane", lastname: "User"};

document.body.innerHTML = greeter(user);
module Main where

import TypeScript.Bindings

config :: TypeScript 
config = TypeScript Nothing -- If tsc is in your $PATH, 
                            -- Nothing should be used as default settings

main :: IO ()
main = typeScriptCompile ["test.ts"] (Just "js") config
$ cd examples && ghc Main.hs && ./Main
[1 of 1] Compiling Main             ( Main.hs, Main.o )
Linking Main ...
ExitSuccess
$ cat js/test.js
function greeter(person) {
    return "Hello, " + person.firstname + " " + person.lastname;
}

var user = { firstname: "Jane", lastname: "User" };

document.body.innerHTML = greeter(user);