pretty-ts-errors
pretty-ts-errors copied to clipboard
Partial support for other languages
This PR adds support of other languages (only for few errors). Supported:
- Missing properties error
- Overload error
This PR partially supports: #27.
Status (for backlog)
Status:
- I created generate-regex.ts
- This file should have higher maintainability, so I decided to use TypeScript via tsx (ts-node is complex around esm).
- I found it's very difficult, as it's impossible to get a single word corresponds
type
,type alias
, etc.- I need some ideas against this.
- imo it's better than nothing, so I'll consider this pr as partial support.
- Supported:
- Missing properties error
- Overload error
Screenshots
const missingSomeProps: Record<"a" | "b", string> = {}
const missingManyProps: Record<"a" | "b" | "c" | "d" | "e" | "f", string> = {}
type Overload = {
(arg: string): string
(arg: number): number
}
const overload: Overload = (arg) => arg
overload(false)