(no title)
jeswin | 1 month ago
The most important thing is that you have these types you can import. For example the "int" below:
import { int } from "@tsonic/core/types.js";
function fibonacci(n: int): int {
if (n <= 1) {
return n;
}
return fibonacci(n - 1) + fibonacci(n - 2);
}
Instead of making it a keyword, I decided to export these from core/types.ts - so that the code can still be compiled with tsc, and all the tooling would still work. Similarly (among others), you'd use ptr<long>, if you wanted a pointer to a long.
No comments yet.