File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ import type { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
3
3
import type { SentryVitePluginOptions } from '@sentry/vite-plugin' ;
4
4
import type { init as initVue } from '@sentry/vue' ;
5
5
6
- // Omitting 'app' as the Nuxt SDK will add the app instance in the client plugin (users do not have to provide this)
6
+ // Omitting Vue 'app' as the Nuxt SDK will add the app instance in the client plugin (users do not have to provide this)
7
+ // Adding `& object` helps TS with inferring that this is not `undefined` but an object type
7
8
export type SentryNuxtClientOptions = Omit < Parameters < typeof initVue > [ 0 ] & object , 'app' > ;
8
- export type SentryNuxtServerOptions = Omit < Parameters < typeof initNode > [ 0 ] & object , 'app' > ;
9
+ export type SentryNuxtServerOptions = Parameters < typeof initNode > [ 0 ] & object ;
9
10
10
11
type SourceMapsOptions = {
11
12
/**
Original file line number Diff line number Diff line change 1
1
import type { Client , Integration , Options , StackParser } from '@sentry/core' ;
2
- import type { SentryNuxtClientOptions } from './common/types' ;
2
+ import type { SentryNuxtClientOptions , SentryNuxtServerOptions } from './common/types' ;
3
3
import type * as clientSdk from './index.client' ;
4
- import type * as serverSdk from './index.server' ;
5
4
6
5
// We export everything from both the client part of the SDK and from the server part. Some of the exports collide,
7
6
// which is not allowed, unless we re-export the colliding exports in this file - which we do below.
8
7
export * from './index.client' ;
9
8
export * from './index.server' ;
10
9
11
10
// re-export colliding types
12
- export declare function init ( options : Options | SentryNuxtClientOptions | serverSdk . NodeOptions ) : Client | undefined ;
11
+ export declare function init ( options : Options | SentryNuxtClientOptions | SentryNuxtServerOptions ) : Client | undefined ;
13
12
export declare const linkedErrorsIntegration : typeof clientSdk . linkedErrorsIntegration ;
14
13
export declare const contextLinesIntegration : typeof clientSdk . contextLinesIntegration ;
15
14
export declare const getDefaultIntegrations : ( options : Options ) => Integration [ ] ;
You can’t perform that action at this time.
0 commit comments