Java parser and interpreter for a strict subset of TypeScript (work in progress)
Java TypeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main
.gitignore
LICENSE
README.md
build.gradle

README.md

Goal

Create something that relates to (a strict subset of) TypeScript like Rhino relates to JavaScript

Working

  let d = new ImageData(40, 20);
  let pos = 0;
  for (let y = 0; y < d.height; y++) {
    for (let x = 0; x < d.width; x++) {
      d.data[pos++] = 255 * x / d.width;
      d.data[pos++] = 255 * y / d.height;
      d.data[pos++] = 50;
      pos++;
    }
  }
  console.log(d);

Gradient

  • A strictly typed version of the ts raytracer example

    Run it via load("/raytracer.ts") from the TS command shell; it will be loaded from the Java resources if the project resource folder is set up correctly.

    The output should look decent on the Ubuntu default shell. Unfortunately, the IntelliJ shell seems to support 16 colors only.

Raytrace

Plan

  • Some Cleanup (better type checks and interface intersection)
  • WebAssembly output prototype
  • Jsdoc output prototype

Missing

  • Strict nullability
  • Dictionaries
  • Class member visibility enforcement
  • Class visibility enforcement
  • Const support and enforcement
  • Generics
  • Probably a lot more