microsoft / microsoft/TypeScript
Playground typing issue
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
🔎 Search Terms
TypeScript Playground error when attempting to import something from @octokit/core/types
🕗 Version & Regression Information
Seems irrelavent to TS version
⏯ Playground Link
💻 Code
import * as OctokitTypes from '@octokit/core/types';
🙁 Actual behavior
Behavior 1:
Type of the following variable is recognized as any:
import { Octokit } from 'octokit';
export type T = typeof Octokit;
Behavior 2:
Type of the following variable is recognized as any;
import * as OctokitTypes from '@octokit/core/types';
export const OctokitTypes;
Behavior 3: Even stranger behavior
In the following code snippet:
import * as OctokitTypes from '@octokit/core/types';
- Remove any character from package name
@octokit/core/types(e.g.@octokit/core/type), TS error occured, which is expected
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three behaviors in the linked TypeScript Playground, focusing on the @octokit/core/types import and the stale diagnostic after editing the package name. Trace the relevant module-resolution or language-server behavior; done means the valid import is resolved with its actual types and diagnostics update after the edit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100