Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Export the types used in public method signatures

Aperta Adatta ai principianti
#1,528 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, node.js, typescript
Ambito
api, tooling

Direzione di ricerca

Inizia da packages/testcontainers/src/index.ts e confronta le sue esportazioni con le firme pubbliche elencate nell’issue. Leggi le dichiarazioni dei tipi e le firme dei metodi pertinenti per confermare quali tipi mancano; l’issue indica inoltre AbstractWaitStrategy come esportazione mancante. Il lavoro è completato quando ogni tipo utilizzato in una firma esportata può essere importato dal punto di ingresso del package.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
TypeScript
Stelle
2.6k
Fork
274
Merge medio
1g 14h
PR unite (30g)
44

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-node

Tutte le issue di testcontainers/testcontainers-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.