How to Complile TypeScript in Browser Via CDN
To complie and run TypeScript, one just need to add stand-alone Babel CDN in the HTML file.
Example code
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel">
function call(name:string){
return "hi " + name + ".";
};
console.log(call('John'));
//hi John.
</script>
Comments
Post a Comment