Skip to content

Export SentryBuildOptions type #13295

Closed

Description

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.

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions