TSDoc and TypeDoc link incompatibility when referencing exported members in a separate file that aren't imported

Đang mở
#500 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
documentation

Hướng nghiên cứu

Start by reading TSDoc’s reference parsing and validation entry points, then trace how {@link some/other/Component.default | Component} is parsed and why it raises tsdoc-reference-missing-hash. Compare that behavior with TypeDoc’s link format and identify whether this specific error can be disabled or the syntax supported. Done means TypeDoc links to unimported exported members work without the reported error; the issue names no files or tests.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

When using TypeDoc to generate files, you can link to a file in two main ways.

You can use an imported module and link to it directly:

import Component from "@/some/other/Component"
/** {@link Component} */

Or, if it is not imported, you can link to it directly:

/** {@link some/other/Component.default | Component} */

This is an incompatibility with TSDoc's formatting, and will throw a tsdoc-reference-missing-hash error. Unless there is a way to disable this specific error, then TSDoc is unusable with TypeDoc if you want to link to a file that is not imported. I could find no workaround to resolve this incompatibility. The closest you can do is omit the ".default" from the link, but that is not a good solution, and wouldn't even work if that file exported another member.

Ngôn ngữ chính
TypeScript
Star
5k
Fork
166
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/tsdoc

Tất cả issue của microsoft/tsdoc

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.