Open
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/vue
SDK Version
8.33.1
Framework Version
Vue 3.5.4
Link to Sentry event
No response
Reproduction Example/SDK Setup
import * as Sentry from '@sentry/vue';
import { Capacitor } from '@capacitor/core';
import type { App } from 'vue';
export default function setupSentry(app: App) {
Sentry.init({
app,
dsn: __SENTRY_DSN__,
enabled: true,
release: __APP_VERSION__,
dist: __APP_VERSION__ + (Capacitor.isNativePlatform() ? '-native' : '-web'),
transport: Sentry.makeBrowserOfflineTransport(Sentry.makeFetchTransport),
transportOptions: {
flushAtStartup: true,
},
logErrors: true,
tracesSampleRate: 0,
autoSessionTracking: false,
sendClientReports: false,
});
}
Steps to Reproduce
After upgrading to 8.33.1 from 7.60.0 I am getting a TypeScript error
Expected Result
Sentry.init
is valid TypeScript
Actual Result
TypeScript Error:
Object literal may only specify known properties, and 'flushAtStartup' does not exist in type 'Partial<BrowserTransportOptions>'.
Current dirty workaround is to manually type transportOptions
import * as Sentry from '@sentry/vue';
import type { BrowserOfflineTransportOptions } from '@sentry/browser/build/npm/types/transports/offline';
import { Capacitor } from '@capacitor/core';
import type { App } from 'vue';
export default function setupSentry(app: App) {
Sentry.init({
app,
dsn: __SENTRY_DSN__,
enabled: true,
release: __APP_VERSION__,
dist: __APP_VERSION__ + (Capacitor.isNativePlatform() ? '-native' : '-web'),
transport: Sentry.makeBrowserOfflineTransport(Sentry.makeFetchTransport),
transportOptions: {
flushAtStartup: true,
} as BrowserOfflineTransportOptions,
logErrors: true,
tracesSampleRate: 0,
autoSessionTracking: false,
sendClientReports: false,
});
}