Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export SentryBuildOptions type #13295

Closed
MonstraG opened this issue Aug 9, 2024 · 2 comments
Closed

Export SentryBuildOptions type #13295

MonstraG opened this issue Aug 9, 2024 · 2 comments

Comments

@MonstraG
Copy link
Contributor

MonstraG commented Aug 9, 2024

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.

MonstraG added a commit to MonstraG/sentry-javascript that referenced this issue Aug 9, 2024
@andreiborza
Copy link
Member

Hi, thanks for filing this. Sounds reasonable to me, would you like to contribute this? :)

cc @lforst

@MonstraG
Copy link
Contributor Author

MonstraG commented Aug 9, 2024

wating for yarn lint before creating pr)

wow it's taking a long time to yarn install and lint everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants