Skip to content

📝 export public API option types for typedoc#4575

Open
thomas-lebeau wants to merge 1 commit intomainfrom
thomas.lebeau/docs-export-public-api-types
Open

📝 export public API option types for typedoc#4575
thomas-lebeau wants to merge 1 commit intomainfrom
thomas.lebeau/docs-export-public-api-types

Conversation

@thomas-lebeau
Copy link
Copy Markdown
Collaborator

Motivation

The generated typedoc API reference (e.g. DatadogRum.startResource) is missing dedicated pages for several option types passed to public methods — ResourceStopOptions, ResourceOptions, ActionOptions, FeatureOperationOptions, and FailureReason. Parameter types render as bare names with no link, so users can't discover the available fields.

Root cause: typedoc.json excludes packages/rum-core, so any type referenced from RumPublicApi must be re-exported through the rum/rum-slim entry points to get a generated page. These five types weren't.

Changes

  • packages/rum-core/src/index.ts — export ActionOptions, ResourceOptions, ResourceStopOptions, FeatureOperationOptions, FailureReason.
  • packages/rum/src/entries/main.ts and packages/rum-slim/src/entries/main.ts — re-export the same five types so typedoc resolves them.

No runtime change; pure type re-exports.

Test instructions

Build and serve the docs locally:

yarn serve:docs

Then in the browser, browse to DatadogRum (under both @datadog/browser-rum and @datadog/browser-rum-slim) and click through the parameter types of:

  • startResourceResourceOptions
  • stopResourceResourceStopOptions
  • startAction / stopActionActionOptions
  • startFeatureOperation / succeedFeatureOperation / failFeatureOperationFeatureOperationOptions
  • failFeatureOperation (second arg) → FailureReason

Each should now navigate to its own page describing the available fields, instead of rendering as a non-clickable type name.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

ActionOptions, ResourceOptions, ResourceStopOptions,
FeatureOperationOptions, and FailureReason are referenced as
parameter types on RumPublicApi but were not exported from the
rum/rum-slim entry points. Since packages/rum-core is excluded
from the typedoc config, those types had no generated pages.
@thomas-lebeau thomas-lebeau requested a review from a team as a code owner May 8, 2026 05:17
@datadog-prod-us1-4
Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.03% (+0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 816dba9 | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants