Skip to content

Incorrect documentation for Sentry.registerWebWorker() #17443

Closed
getsentry/sentry-docs
#14699

Description

@medmunds

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

10.5.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

#16981 added Sentry.registerWebWorker(). However, the documentation repeatedly refers to it as Sentry.registerWorker(), which doesn't seem to exist. So do some comments in the code.

Steps to Reproduce

  1. npm install --save @sentry/browser@10.5.0
  2. Create service-worker.ts:
    import * as Sentry from "@sentry/browser";
    Sentry.registerWorker({ self });
  3. Attempt to compile it with tsc

Expected Result

No errors

Actual Result

TS2551: Property 'registerWorker' does not exist on type 
'typeof import(".../node_modules/@sentry/browser/build/npm/types/index")'.
Did you mean 'registerWebWorker'?

The answer to "Did you mean 'registerWebWorker'?" is yes. But that's not what's documented.

Image

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 22, 2025
  2. Lms24 commented on Aug 22, 2025

    @Lms24
    Member

    Hey thanks for reporting, good catch! Will fix on Monday.

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 22, 2025
  4. self-assigned this
    on Aug 25, 2025
  5. added and removed on Aug 25, 2025
  6. Lms24 commented on Aug 25, 2025

    @Lms24
    Member

    Fixed via #17447 and getsentry/sentry-docs#14699. Will close once the latter is merged. Thanks for reporting!

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

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions