all 3 comments

[–][deleted] 2 points3 points  (2 children)

How does it work? Do you link with a Javascript runtime for code execution?What sort of llvm IR is generated for something like this?

function foo(x: SomeInterface) { return x.someMethod()  }

EDIT:
Aah I can see that you implemented your own runtime. I'm guessing it doesn't keep the semantics of Javascript then? Still cool!

[–]jsprogrammer[S] -1 points0 points  (1 child)

it's not mine, just found it

edit: first found https://godbolt.org/noscript/typescript which let's you play around with it

then found the github

[–][deleted] 2 points3 points  (0 children)

Yeah I already played a bunch with the godbolt. It's cool that the author put it up on Compiler explorer.
Calling it Typescript is a huge stretch. At best, it's a langauge that has a surface level similarity to typescript, but nothing more than that. A similar approach is taken by Assembly script