abacus-ts

Mini calculator implemented by only TypeScript type operation

Usage no npm install needed!

<script type="module">
  import abacusTs from 'https://cdn.skypack.dev/abacus-ts';
</script>

README

+*-/+*-/ abacus-ts +*-/+*-/

A simple calculator implemented by only TypeScript type operation.

import { Calc } from "abacus-ts";

type Answer = Calc<"(3+4-1)*2/2">;

const a: Answer = 6;

capture

Try it with TypeScript Playground!

License

MIT