0.1.9 • Published 2 years ago

ts-type-diagnostic v0.1.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

ts-type-diagnostic

Show Typescript assignment errors in a conflict table.

This is a global npm tool that runs in the terminal and uses the Typescript Compiler API to generate a conflict table with links.

IOW Instead of a multiline hover error like this, a table that shows the conflicting types with links that bring you to their declaration.

link

In some cases this tool can also fix the problem. link

Installation

# Global installation is recommended.
npm install -g ts-type-diagnostic

Usage

Command Line

# Create a conflict table for a ts file with assignment errors.
tstd file.ts

# Create a verbose table.
tstd --v file.ts

Semantic Errors

Most Typescript errors are easy to fix--they're on the same line they occur:

const A: number;
# Can't assign A to B.
const B: string = A;

But where do you look if A is:

  • declared on another line, perhaps in another file, perhaps in another package
  • is a return type and B on another line, perhaps in another file, perhaps in another package
  • A and B are both type shapes with mismatched or missing properties
  • B is an array and A is an array item
  # Type FC<Node> is not assignable to ShapeComponent.
   # Type of 'props' and 'props' are unassignable
    # England is the capital of France
  return NodeShape
0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.1.2

2 years ago

0.1.8

2 years ago

0.0.26

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.12

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago