microsoft / microsoft/typescript-analyze-trace

feature request: Show source code in the output

Open
#34 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
429
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Showing the filename and line numbers is helpful, but it means a lot of manually digging when looking for common patterns.

I made another POC. The tree component may need to be fixed or replaced to support new lines.

Screen Shot 2022-09-22 at 11 45 53 AM

As a developer using TypeScript, and not somebody developing TypeScript, it might even be more helpful to show less of the internal information, and instead display the results similar to how tsc shows errors.

BEFORE

 {"id":4961,"kind":"GenericTypeAlias","name":"Pick","aliasTypeArguments":[4909,4960],"location":{"path":"/users/dylang/repo/node_modules/typescript/lib/lib.es5.d.ts","line":1578,"char":1}}

AFTER

repo/node_modules/typescript/lib/lib.es5.d.ts:1578:1

1578 type Pick<T, K extends keyof T> = {
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named; start by locating the tree component and reviewing the referenced POC and current output path. Done means the tool presents a tsc-like filename, line, and character location with source text and highlighting instead of the current verbose internal representation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.