Skip to content

Export SentryBuildOptions type #13295

Closed
@MonstraG

Description

@MonstraG

Problem Statement

In order to have typing assistance when writing sentry config, I have to do:

/**
 * @type {import("node_modules/@sentry/nextjs/build/types/config/types").SentryBuildOptions}
 */
const sentryConfig = {
    // For all available options, see:
    // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

    // Upload a larger set of source maps for prettier stack traces (increases build time)
    widenClientFileUpload: true,
    ...
};

and that's fragile. I would like to be able to do {import("@sentry/nextjs").SentryBuildOptions} or something like that.

Solution Brainstorm

add

export { SentryBuildOptions } from './config/types';

to index.types.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions