Coder Social home page Coder Social logo

vscode-visualize-typescript's Introduction

visualize-typescript

Ever wished to add thumbnails to a typescript component or type OR see the color of a theme variable? I know I did so many times so I built this extension for both of us!

just add this magical comment at the type definition and you will see it when you hover over it from any file!

for colors: // color(#ffff00) for images: // image(/full/image/path.png) or // image(../relative/path/path.jpg)

image

image

type ColorsType = {
  inlineColor: string; // color(#ff0000)

  // color(#ff0000)
  previousLineColor: string;

  inlineImage: string; // image("/abs/path/mindblown.jpg");

  // image("./rel/path/mindblown.jpg")
  previousLineRelImage: string;
};

const alsoWorksDirectly = {
  inlineColor: "red", // color(#ff0000)
};

Extension Settings

This extension contributes the following settings:

  • visualize-typescript.enabled: enable/disable this extension

Known Issues

this is an alpha stage project so please report any issues

  • only hex colors for now

Release Notes

check the ./CHANGELOG.md file for details

vscode-visualize-typescript's People

Contributors

a7madgamal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

daveoff

vscode-visualize-typescript's Issues

Type string union

Would be great if it also worked with type union...

type IconName =
  // image(../../assets/icons/icon1.svg)
  | 'icon1' 
  // image(../../assets/icons/icon2.svg)
  | 'icon2'
  // image(../../assets/icons/icon3.svg)
  | 'icon3'
  // image(../../assets/icons/icon4.svg)
  | 'icon4'

Then I could use something like:

const icon: IconName = 'icon2' // <-- here it could show on autocomplete or while hovering 
Screenshot 2024-02-17 at 10 15 35 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.