microsoft / microsoft/TypeScript
Playground typing issue
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
### 🔎 Search Terms
TypeScript Playground error when attempting to import something from `@octokit/core/types`
### 🕗 Version & Regression Information
Seems irrelavent to TS version
### ⏯ Playground Link
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAKjgQwM5wPIGMYQNbAwAqAnmAKboBmUEIcA5AAIQ76ED0W05HMZlBgCghoSLDgBvTGwLwAvnBp1GrXHIYBuEdwB2qeAHNCACwCuAIzgBeOLvIB3GesIAKAJTah5AB7j4egbO7MQCqF6+-nD8FMFypLG2MeQQVHDGMOYW2kA
### 💻 Code
```ts
import * as OctokitTypes from '@octokit/core/types';
```
### 🙁 Actual behavior
**Behavior 1**:
Type of the following variable is recognized as `any`:
```ts
import { Octokit } from 'octokit';
export type T = typeof Octokit;
```
**Behavior 2**:
Type of the following variable is recognized as `any`;
```ts
import * as OctokitTypes from '@octokit/core/types';
export const OctokitTypes;
```
**Behavior 3**: _Even stranger behavior_
In the following code snippet:
```ts
import * as OctokitTypes from '@octokit/core/types';
```
1. Remove any character from package name `@octokit/core/types` (e.g. `@octokit/core/type`), TS error occured, which is expected
2. Re-add the removed character, TS error remained, which is very weird
Apparently there is some problem with the language server, as the package name has been changed to `*/types`, but it still reports error of `*/type`
### 🙂 Expected behavior
N/A
### Additional information about the issue
_No response_
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo i tre comportamenti nel TypeScript Playground collegato, concentrandoti sull’import di @octokit/core/types e sulla diagnostica obsoleta dopo la modifica del nome del pacchetto. Traccia il comportamento rilevante della risoluzione dei moduli o del language server; il lavoro è completato quando l’import valido viene risolto con i suoi tipi effettivi e la diagnostica viene aggiornata dopo la modifica.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100