Question

The title says it: are there browsers in which I can directly evaluate TypeScript (rather than JavaScript) expressions directly in the console?

If not: do current browsers have APIs that could be used to develop plugins or extensions to do just that — integrating smoothly with the built-in console?

Was it helpful?

Solution

are there browsers in which I can directly evaluate TypeScript (rather than JavaScript) expressions directly in the console

No

do current browsers have APIs that could be used to develop plugins or extensions to do just that — integrating smoothly with the built-in console

Not the built in console. But you can create a new TypeScript console. This would be similar to the coffescript console : https://developers.google.com/chrome-developer-tools/docs/sample-extensions#coffeescript_console

Should be simple enough to twist that to a TypeScript console if you want to. Its basically this line : https://github.com/snookca/CoffeeConsole/blob/master/src/coffee-console.html#L89 that needs to point to something like TypeString : https://www.npmjs.org/package/typestring. Syntax highlighting is a much more involved problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top