DEV Community

Cover image for Enjoying TypeScript? Bring it to your DevTools 👩‍💻
Madyan
Madyan

Posted on

9 5

Enjoying TypeScript? Bring it to your DevTools 👩‍💻

As web developers, TypeScript has revolutionised our development experience. It helped us catch bugs as we type our code, provided us with rich auto-completions allowing us to discover public interfaces of objects without having to read their source code and overall just made the JavaScript development experience much more fun! 🥳

We tend to spend the majority of our time as developers in our IDEs, which is great since it is where TypeScript excels. However, TypeScript is yet to come to our second homes as web devs, our browsers DevTools 😢

I need you

Have you ever tried writing a quick script in your browser's console to manipulate a page? It might have been some experimental code, or perhaps it was a bookmarklet to automate a task? Have you started writing code like this and wished you can get validation ahead of time rather than by trial and error?

JSON.stringify(
  myAwesomeObject,
  2, // which argument was the spacing one again?
)
Enter fullscreen mode Exit fullscreen mode

Well I don't know about you, but I'm not patient enough to wait until Google supports TypeScript in their DevTools, so I've decided to take things into my own hands and build an Open Source Chrome Extension 🙌

Console+ demo

This is still experimental, but you can try it out now by downloading it from the Chrome Web Store 👈

TypeScript All The Things meme

Lastly, this is on Open Source project. Hence it wouldn't be awesome without the community's input and contributions. Please submit issues and/or PRs on GitHub to help improve the experience for yourself and other devs 🙏

GitHub logo madyanalj / console-plus

💻 Chrome DevTools extension that allows running TypeScript code from the browser.

Console+

Chrome extension which allows developers to run TypeScript code right from their browsers 💻

Demo

🗃 Download from the Chrome Web Store

Stack

TypeScript | Monaco Editor | Node v13 | Chrome Extension API | Parcel.js | ESLint | Jest

Development

  1. Install dependencies using:
    npm install
    Enter fullscreen mode Exit fullscreen mode
  2. Run the following to generate the Chrome Extension in /dist:
    npm run build
    Enter fullscreen mode Exit fullscreen mode
  3. Go to chrome://extensions/ and ensure "Developer mode" is on.
  4. Click on "Load unpacked" and select the /dist directory.
  5. To make further changes, run npm run build again then click on "Update".

Contribution

Issues and Pull Requests are more than welcome.

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (2)

Collapse
 
waylonwalker profile image
Waylon Walker

This looks fascinating.

Congrats on your first post! Keep up the momentum.

Collapse
 
madyanalj profile image
Madyan

Cheers buddy. Really appreciate your support 💛

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay