Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a TypeScript function from the chrome console

I am using Typescript and want to run a function or set static properties of classes directly via the chrome console to iterate faster. But I don't know how.

I use TypeScript.

like image 950
Geert van den Burg Avatar asked Aug 07 '26 17:08

Geert van den Burg


1 Answers

You cannot use Typescript in Chrome. Typescript is superset of JS and you must first compile .TS file to .JS file. If you try use TS in browser, you just get an syntax error.

If you want, you can use extensions for Chrome (for example https://chrome.google.com/webstore/detail/typescript-console/omklacjbengpcndogglbpjfifmiagmgp), but I do not have any experience with this. I'm pretty sure, that this do not speed up coding.

like image 102
Kamil Naja Avatar answered Aug 10 '26 14:08

Kamil Naja



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!