Skip to content

Latest commit

 

History

History

typescript-explorer-vscode

TypeScript Explorer

demo

Disclaimer: This project is currently IN BETA, and is therefore subject to bugs and feature incompleteness!! Please open an issue if you encounter a bug or have any other suggestions!

VSCode Extension providing full type information in TypeScript projects. Supports:

  • Functions
  • Primitive Types
  • Literal Types
  • Generics (Type Parameters)
  • Classes, Interfaces, Enums
  • Namespaces, Modules
  • Conditional Types, Infer

Usage

Typescript Explorer provides a new view container, which presents hierarchical type information for type definitions, variables, and functions in TypeScript Projects:

type tree view

By default, this will update type information on every click/selection in the text editor. This behavior can be changed either by locking the selection, or by disabling the "Type Tree > Selection" configuration option.

There is also a command, "Select Symbol in Type Tree," which selects the type at the current cursor position, and is available in the editor's right-click menu:

select symbol command

Go To Definition

go to definition

Finds the definition of the selected menu item. This will first go to the associated symbol; if there is no symbol, this will find the associated type definition.

If there are multiple definitions (such as in declaration merging), they will cycle through.

Hover for JSDoc

hover for jsdoc

Hover over an item in the menu to retrieve JSDoc.

Lock Selection

lock selection

Prevents the current shown type information from changing on editor/cursor selection.

Configuration

Selection

selection config

Prevents type information from changing on click in the editor.

Base Class / Type Parameters

base class and type parameter config

Enable/disable base class or ambient type parameter information.

Icons

icon config

Toggle icons and icon colors in the tree view.

Readonly

readonly config

Adds "readonly" to readonly properties and arrays:

readonly demonstration