microsoft / microsoft/TypeScript
Playground typing issue
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
🔎 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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ba hành vi trong TypeScript Playground được liên kết, tập trung vào import @octokit/core/types và chẩn đoán cũ sau khi chỉnh sửa tên gói. Truy vết hành vi liên quan của việc phân giải mô-đun hoặc language server; hoàn tất có nghĩa là import hợp lệ được phân giải với các kiểu thực tế của nó và các chẩn đoán được cập nhật sau khi chỉnh sửa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- compilers
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100