Skip to content

Required BrowserClientOptions properties contradict Troubleshooting documentation #5298

@cefn

Description

@cefn

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/browser

SDK Version

7.2.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

The minimal invocation of BrowserClient (passing just the dsn in the options as demonstrated in the Javascript documentation) is a compiler error in Typescript. It suggests the Typescript types don't align with actual usage.

See also the discussion topic at #5293

Expected Result

The call to BrowserClient demonstrated in the Javascript documentation does compile in Typescript.

Actual Result

This is the compiler error you get when passing just a dsn option (as per the reference example in the Sentry documentation).

TS2345: Argument of type '{ dsn: string; }' is not assignable to parameter of type 'BrowserClientOptions'.   Type '{ dsn: string; }' is missing the following properties from type 'BrowserClientOptions': integrations, transport, stackParser

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions