ts-calc

compute with typescript type system

MIT License

Stars
52

ts-calc

compute with typescript type system

📦 ts-calc is now integrated in HOTScript.

You can compute almost anything with typescript type system. Unlike most example out there that use number to tuple trick, this is using new typescript 4.8 feature to convert strings to numbers or bigint. This allows to arbitrary long number computations that tuple trick can't do. This code base implement number and bigint for the following type functions:

  • addition
  • negation
  • absolute value
  • subtraction
  • comparison
  • multiplication
  • division
  • modulo
  • power
  • factorial
  • range
  • fizzbuzz

enjoy!