Skip to content

Playground typing issueΒ #63334

@BrandonStudio

Description

@BrandonStudio

πŸ”Ž 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

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';
  1. Remove any character from package name @octokit/core/types (e.g. @octokit/core/type), TS error occured, which is expected
    Image
  2. Re-add the removed character, TS error remained, which is very weird
    Image
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions