Skip to content

[@sentry/remix] init method is typed to return void, but actually returns the client #13932

Closed
@haines

Description

@haines

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/remix

SDK Version

8.33.1

Framework Version

2.12.1

Link to Sentry event

No response

Reproduction Example/SDK Setup

export function init(options: RemixOptions): Client | undefined {

export function init(options: RemixOptions): NodeClient | undefined {

export declare function init(options: RemixOptions): void;

Steps to Reproduce

I want to use our existing OpenTelemetry setup with Remix.

The guide says to import init from @sentry/node, but that won't set up the Sentry Remix SDK, will it?

But if I input init from @sentry/remix, it's typed to return void even though it actually returns a Sentry client.

Expected Result

I can use an existing OpenTelemetry setup with Remix without getting TypeScript compilation errors.

Actual Result

The types are wrong

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: remixIssues related to the Sentry Remix SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions