MCPcopy Index your code
hub / github.com/dprint/dprint-plugin-typescript

github.com/dprint/dprint-plugin-typescript @0.96.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.96.1 ↗ · + Follow
890 symbols 3,484 edges 37 files 97 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dprint-plugin-typescript

CI

TypeScript formatting plugin for dprint.

This uses the swc parser for TypeScript written in Rust (it's super fast).

Install

See the GitHub releases.

Development

The tests are in the ./tests/specs folder. To run the tests, run cargo test.

Building Wasm file

You may wish to try out the plugin by building from source:

  1. Run cargo build --target wasm32-unknown-unknown --release --features "wasm"
  2. Reference the file at ./target/wasm32-unknown-unknown/release/dprint_plugin_typescript.wasm in a dprint configuration file.

Extension points exported contracts — how you extend this code

ParametersRanged (Interface)
(no doc) [17 implementers]
src/generation/generate_types.rs
InnerRanged (Interface)
(no doc) [3 implementers]
src/generation/generate_types.rs
RangedExtensions (Interface)
(no doc) [1 implementers]
src/generation/generate_types.rs
NodeExtensions (Interface)
(no doc) [1 implementers]
src/generation/generate_types.rs
BinaryOpExtensions (Interface)
(no doc) [1 implementers]
src/generation/swc/extensions.rs

Core symbols most depended-on inside this repo

into
called by 718
src/generation/generate_types.rs
gen_node
called by 202
src/generation/generate.rs
insert
called by 193
src/configuration/builder.rs
get_value
called by 186
src/generation/generate.rs
range
called by 147
src/generation/swc/flatten_curried_arrows.rs
iter
called by 91
src/utils/stack.rs
start
called by 67
src/generation/generate.rs
push
called by 56
src/utils/stack.rs

Shape

Function 487
Method 314
Class 56
Enum 28
Interface 5

Languages

Rust100%
TypeScript1%

Modules by API surface

src/generation/generate.rs424 symbols
src/configuration/builder.rs193 symbols
src/generation/tokens.rs33 symbols
src/generation/context.rs25 symbols
src/swc.rs24 symbols
src/generation/generate_types.rs23 symbols
src/generation/node_helpers.rs22 symbols
src/configuration/types.rs21 symbols
src/utils/string_utils.rs11 symbols
src/generation/swc/flatten_member_like_expr.rs11 symbols
src/generation/swc/flatten_curried_arrows.rs10 symbols
src/utils/file_text_has_ignore_comment.rs9 symbols

For agents

$ claude mcp add dprint-plugin-typescript \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact