Get useful type information where you need it
Prettify TS is a Visual Studio Code extension that enhances your TypeScript development experience. It provides hover information for TypeScript types, classes, interfaces, and more, formatted in a more readable and configurable way.
Install via the VSCode Marketplace:
This README is for developing Prettify TS. The extension README (shown on the Marketplace) is here.
Note:
pnpm
is required. Install it here.
pnpm install # Installs all dependencies
pnpm test # Builds and runs the extension test suite
pnpm build # Compiles the codebase
pnpm package # Builds + prepares the VSIX package for publishing
You do not need to build manually — test
and package
handles build steps automatically.
The full integration test suite lives in test/
. For more info on the test layout, debugging instructions, and hover validation strategy, see the Test README.
This repo uses pnpm workspaces to manage multiple packages:
.
├── packages/
│ ├── typescript-plugin/ # TypeScript language service plugin
│ └── vscode-extension/ # VSCode extension host + UI
└── test/ # Full integration test suite
└── scripts/ # Utility scripts for development, building, or CI
During development, pnpm automatically symlinks the plugin into the extension’s node_modules
for live debugging.
To prepare for publishing:
-
Prepackage:
- Copies actual plugin files into the extension
- Rewrites
workspace:*
to*
forvsce
compatibility
-
Package:
- Runs
vsce package
to produce.vsix
- Runs
-
Postpackage:
- Reverts everything back for dev (restores
workspace:*
and symlinks)
- Reverts everything back for dev (restores
Defined in .vscode/launch.json
:
- Run Extension: Launches VSCode with the extension loaded for manual debugging
- Attach to TSServer: Debug the TypeScript language service plugin
Use the VSCode Run panel (Ctrl+Shift+D / Cmd+Shift+D) to start these sessions.
Happy coding! 🎉