You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can we use this in the browser to compile and run ts? #18
changed the title [-]Can we use this in the browser to compile and run js?[/-][+]Can we use this in the browser to compile and run ts?[/+]on Mar 3, 2018
Yes sure but the real question is why should you do this? Let's say you only serve the typescript files and a typescript compiler, that would mean that whenever someone visits your website they first have to run the typescript compiler in order to execute javascript code. This is just inefficient. There are websites, however, that provide an online typescript sandbox (e.g. https://www.typescriptlang.org/play). This could be a use case for a typescript compiler that gets executed in a browser.
Activity
[-]Can we use this in the browser to compile and run js?[/-][+]Can we use this in the browser to compile and run ts?[/+]svallory commentedon Apr 11, 2018
Never tried it actually, but I think it will work. It hasn't been maintained for a long time though
IlijazM commentedon Dec 31, 2020
Yes sure but the real question is why should you do this? Let's say you only serve the typescript files and a typescript compiler, that would mean that whenever someone visits your website they first have to run the typescript compiler in order to execute javascript code. This is just inefficient. There are websites, however, that provide an online typescript sandbox (e.g. https://www.typescriptlang.org/play). This could be a use case for a typescript compiler that gets executed in a browser.