Skip to content

📝 export public API option types for typedoc#4575

Merged
thomas-lebeau merged 1 commit intomainfrom
thomas.lebeau/docs-export-public-api-types
May 11, 2026
Merged

📝 export public API option types for typedoc#4575
thomas-lebeau merged 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

datadog-prod-us1-4 Bot commented May 8, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.02% (+0.01%)

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

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 11, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 179.65 KiB 179.65 KiB 0 B 0.00%
Rum Profiler 6.17 KiB 6.17 KiB 0 B 0.00%
Rum Recorder 27.03 KiB 27.03 KiB 0 B 0.00%
Logs 56.78 KiB 56.78 KiB 0 B 0.00%
Rum Slim 135.50 KiB 135.50 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance

Pending...

🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 31.78 KiB 30.71 KiB -1.07 KiB
RUM - add action 56.94 KiB 55.34 KiB -1.61 KiB
RUM - add timing 32.72 KiB 32.63 KiB -98 B
RUM - add error 60.80 KiB 59.75 KiB -1.04 KiB
RUM - start/stop session replay recording 32.10 KiB 32.61 KiB +515 B
RUM - start view 484.29 KiB 482.24 KiB -2.05 KiB
Logs - log message 95.66 KiB 102.63 KiB +6.97 KiB

🔗 RealWorld

@thomas-lebeau thomas-lebeau merged commit c297563 into main May 11, 2026
22 checks passed
@thomas-lebeau thomas-lebeau deleted the thomas.lebeau/docs-export-public-api-types branch May 11, 2026 07:19
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 2026
Copy link
Copy Markdown
Contributor

@BeltranBulbarellaDD BeltranBulbarellaDD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants