11import 'vue'
22import 'vuex'
33import '@nuxt/types'
4- import { Client } from '@sentry/types'
4+ import * as SentryNode from '@sentry/node'
5+ import * as SentryTypes from '@sentry/core'
56import { PartialModuleConfiguration } from './configuration'
67
78export type ModulePublicRuntimeConfig = Pick < PartialModuleConfiguration , 'config' | 'clientConfig' | 'serverConfig' >
89
10+ type Sentry = typeof SentryTypes
11+ type NodeSentry = typeof SentryNode
12+
913// add type to Vue context
1014declare module 'vue/types/vue' {
1115 interface Vue {
12- readonly $sentry : Client
16+ readonly $sentry : Sentry
1317 $sentryLoad ( ) : Promise < void >
14- $sentryReady ( ) : Promise < Client >
18+ $sentryReady ( ) : Promise < Sentry >
1519 }
1620}
1721
1822// App Context and NuxtAppOptions
1923declare module '@nuxt/types' {
2024 interface Context {
21- readonly $sentry : Client
25+ readonly $sentry : Sentry
2226 $sentryLoad ( ) : Promise < void >
23- $sentryReady ( ) : Promise < Client >
27+ $sentryReady ( ) : Promise < Sentry >
2428 }
2529
2630 interface NuxtOptions {
2731 sentry ?: PartialModuleConfiguration
2832 }
2933
3034 interface NuxtAppOptions {
31- readonly $sentry : Client
35+ readonly $sentry : Sentry
3236 $sentryLoad ( ) : Promise < void >
33- $sentryReady ( ) : Promise < Client >
37+ $sentryReady ( ) : Promise < Sentry >
3438 }
3539}
3640
@@ -43,16 +47,16 @@ declare module '@nuxt/types/config/runtime' {
4347// add types for Vuex Store
4448declare module 'vuex/types' {
4549 interface Store < S > {
46- readonly $sentry : Client
50+ readonly $sentry : Sentry
4751 $sentryLoad ( ) : Promise < void >
48- $sentryReady ( ) : Promise < Client >
52+ $sentryReady ( ) : Promise < Sentry >
4953 }
5054}
5155
5256declare global {
5357 namespace NodeJS {
5458 interface Process {
55- sentry : Client
59+ sentry : NodeSentry
5660 }
5761 }
5862}
0 commit comments