Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Export the types used in public method signatures

Đang mở Phù hợp với người mới
#1,528 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, node.js, typescript
Lĩnh vực
api, tooling

Hướng nghiên cứu

Bắt đầu tại packages/testcontainers/src/index.ts và so sánh các export của tệp này với những chữ ký công khai được liệt kê trong issue. Đọc các khai báo kiểu và chữ ký phương thức liên quan để xác nhận những kiểu nào còn thiếu; issue cũng xác định AbstractWaitStrategy là một export còn thiếu. Công việc hoàn tất khi mọi kiểu được dùng trong chữ ký đã export đều có thể được import từ điểm vào của package.

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

Mô tả

enhancement minor

What happens

Several types appear in public method signatures but are not exported from packages/testcontainers/src/index.ts, so consumers cannot name them. That makes it awkward to build arguments in a helper, annotate a variable, or write a wrapper.

Type Appears in
BindMount withBindMounts
TmpFs withTmpFs
Ulimits withUlimits
ExtraHost withExtraHosts
ResourcesQuota withResourcesQuota
DirectoryToCopy withCopyDirectoriesToContainer, copyDirectoriesToContainer
ArchiveToCopy withCopyArchivesToContainer
BuildArgs GenericContainerBuilder.withBuildArgs
HttpWaitStrategy return type of Wait.forHttp
CompositeWaitStrategy return type of Wait.forAll
ShellWaitStrategy return type of Wait.forSuccessfulCommand
StartedGenericContainer return type of StartedDockerComposeEnvironment.getContainer
ComposeDownOptions StartedDockerComposeEnvironment.down, StoppedDockerComposeEnvironment.down
ComposeOptions DockerComposeEnvironment.withClientOptions
Reaper return type of getReaper
Ports, HostPortBindings, HealthCheckStatus, NetworkSettings fields of the exported InspectResult

AbstractWaitStrategy is not exported either. A custom wait strategy that is not a StartupCheckStrategy has to implement WaitStrategy directly and re-implement the timeout bookkeeping (withStartupTimeout, isStartupTimeoutSet, getStartupTimeout).

Expected

Every type that appears in an exported signature is exported from index.ts. AGENTS.md already asks for this when a type becomes part of the public API.

Where

packages/testcontainers/src/index.ts.

Notes

  • getContainer could return the StartedTestContainer interface instead of exporting the concrete StartedGenericContainer class.
  • npm run knip does not catch these, because the types are used by other files.
  • A check that fails when an exported signature references an unexported type would stop this recurring.

Dependencies

  • Nothing blocks this. It can start now.
Ngôn ngữ chính
TypeScript
Star
2.6k
Fork
274
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
44

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 testcontainers/testcontainers-node

Tất cả issue của testcontainers/testcontainers-node

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.