Skip to content

Add TSDoc to the public API and publish an API reference #1579

Open

Description

@cristianrgreco

What happens

The public API has almost no doc comments. An editor hover shows a signature and nothing else:

File Public methods Doc comments
test-container.ts (TestContainer, StartedTestContainer) 57 0
generic-container.ts 40 0
docker-compose-environment.ts 13 0
http-wait-strategy.ts 11 0
wait.ts 7 0
generic-container-builder.ts 7 0
network.ts 4 0

Defaults, units and behaviour (stop() removes the container and its volumes by default, withBindMounts replaces, logs({ since }) is in seconds) are only on the docs site, where they are described per feature and not per method.

Expected

  • A short TSDoc comment on every exported method and option field, covering what the code cannot say: the default, the unit, and any non-obvious behaviour.
  • An API reference generated from those comments and published with the docs site.

Where

  • packages/testcontainers/src/test-container.ts, types.ts and the exported classes
  • mkdocs.yml and the Docs job in .github/workflows/checks.yml

Notes

  • AGENTS.md asks for minimal code comments. This would be a deliberate exception for the exported API, limited to information a caller cannot get from the signature.
  • Can be done one file at a time.

Dependencies

Activity

  1. added
    maintenanceImprovements that do not change functionality
    patchBackward compatible bug fix
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceImprovements that do not change functionalitypatchBackward compatible bug fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions