Skip to content

Conversation

sevenc-nanashi
Copy link

@sevenc-nanashi sevenc-nanashi commented Jun 3, 2024

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

image
image

image
image

image
image

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)

@sevenc-nanashi sevenc-nanashi changed the title Support other languages than english by generating regex [Very WIP, help wanted] Support more languages Jun 3, 2024
@sevenc-nanashi sevenc-nanashi marked this pull request as ready for review June 3, 2024 01:31
@sevenc-nanashi sevenc-nanashi changed the title Support more languages Support more languages for a few prop Jun 3, 2024
@sevenc-nanashi sevenc-nanashi changed the title Support more languages for a few prop Internationalized missing properties error. Jun 3, 2024
@sevenc-nanashi sevenc-nanashi marked this pull request as draft June 3, 2024 01:54
@sevenc-nanashi sevenc-nanashi marked this pull request as ready for review June 3, 2024 02:35
@sevenc-nanashi sevenc-nanashi changed the title Internationalized missing properties error. Support other languages (only for few errors) Jun 3, 2024
@sevenc-nanashi sevenc-nanashi changed the title Support other languages (only for few errors) Partial support other languages Jun 3, 2024
@sevenc-nanashi sevenc-nanashi changed the title Partial support other languages Partial support for other languages Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant