arethetypeswrong / arethetypeswrong/arethetypeswrong.github.io

feature: detect inferred type cannot be named error

Open
#45 3 comments 0 reactions 0 assignees View on GitHub
feature needs npm install
Dominant language
TypeScript
Stars
1.6k
Forks
65
PR merge metrics
No merged PRs in 30d

Description

I was thinking about doing something similar.

Basically what's need is to get the package, install the dependencies, and see if the types in the output files can be resolved or not.

This is especially problematic with `pnpm` with monorepo as the transient packages are located at the top level `./node_modules/.pnpm/...`.

For example:

```sh
# Dependency graph
- lib-a
- lib-b
- lib-c
```

```sh
# folder
- packages
- lib-a
- node_modules
- lib-b # symlink to /node_modules/.pnpm/lib-b/version-y
- node_modules
- .pnpm
- lib-b@version-y
- lib-c@version-x
```

If `lib-b` does not re-exports the type from `lib-c`, you will get Inferred type cannot be named error.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name files, tests, or an entry point. Start by tracing package installation and output-type resolution for pnpm monorepos, then define completion as detecting when an inferred type cannot be named because a transitive dependency's type is not re-exported.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.