This test.html page fails on Google Chrome (April 2019, Version 73.0.3683.86)
<html>
<body>
<script>
const str: string = "hello";
alert(a);
</script>
</body>
It complains with
Uncaught SyntaxError: Missing initializer in const declaration
This shows that Google Chrome does not understand typescript.
I tried also with <script type="application/ecmascript">
, but I get the same error.
Can I use typescript directly on Google Chrome (without trans-compiling to javascript)?