microsoft / microsoft/TypeScript
Playground typing issue
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
### 🔎 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_
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた TypeScript Playground で 3 つの挙動を再現することから始め、@octokit/core/types の import と、パッケージ名を編集した後に残る古い診断に焦点を当ててください。関連するモジュール解決または language server の挙動を追跡してください。完了とは、有効な import が実際の型とともに解決され、編集後に診断が更新されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100