Deno: Supports TypeScript while also browser compatible?

Created on 18 Jan 2019  路  3Comments  路  Source: denoland/deno

"Supports TypeScript out of the box."
and
"Aims to be browser compatible."

seem mutually exclusive, or am I missing something? How can deno support TypeScript out of the box, but also be browser compatible? Or is the compatibility in one direction (i.e. it supports everything the browser does but not the other way 'round)?

It might be worth clarifying this in the docs maybe?

Most helpful comment

Browser compatible means that where we overlap in functionality with the browser, EG fetch() that we use the browser APIs. There are many things you can do in deno that will not run in the web browser - typescript is one of them - starting a TCP server is another. But if you use javascript and don't import the built-in "deno" module, the script should be browser compatible.

All 3 comments

Browser compatible means that where we overlap in functionality with the browser, EG fetch() that we use the browser APIs. There are many things you can do in deno that will not run in the web browser - typescript is one of them - starting a TCP server is another. But if you use javascript and don't import the built-in "deno" module, the script should be browser compatible.

Thanks for the clarification!

@davidbarratt There are projects like:

that allow you to use TS directly in <script> tags in the browser.
(Not that it's efficient but it's possible.)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ry picture ry  路  3Comments

watilde picture watilde  路  3Comments

xueqingxiao picture xueqingxiao  路  3Comments

doutchnugget picture doutchnugget  路  3Comments

metakeule picture metakeule  路  3Comments