File tree Expand file tree Collapse file tree 4 files changed +8
-13
lines changed
Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ export default defineNuxtModule<ModuleConfiguration>({
6363 }
6464
6565 if ( options . publishRelease ) {
66+ // @ts -expect-error Defu introduces "null" value in its merged types which cause error.
6667 options . publishRelease = defu ( options . publishRelease , defaultsPublishRelease )
6768 }
6869
Original file line number Diff line number Diff line change @@ -46,18 +46,12 @@ export interface ModuleConfiguration {
4646 lazy : boolean | LazyConfiguration
4747 logMockCalls : boolean
4848 /** See available options at https://github.com/getsentry/sentry-webpack-plugin */
49- publishRelease : boolean | SentryCliPluginOptions
49+ publishRelease : boolean | Partial < SentryCliPluginOptions >
5050 runtimeConfigKey : string
5151 serverConfig : NodeOptions | string
5252 serverIntegrations : ServerIntegrations
5353 sourceMapStyle : WebpackOptions [ 'devtool' ]
5454 requestHandlerConfig : Handlers . RequestHandlerOptions
5555}
5656
57- type DeepPartial < T > = {
58- [ P in keyof T ] ?: T [ P ] extends Array < infer I >
59- ? Array < DeepPartial < I > >
60- : DeepPartial < T [ P ] > ;
61- }
62-
63- export type DeepPartialModuleConfiguration = DeepPartial < ModuleConfiguration >
57+ export type PartialModuleConfiguration = Partial < ModuleConfiguration >
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import 'vue'
22import 'vuex'
33import '@nuxt/types'
44import { Client } from '@sentry/types'
5- import { DeepPartialModuleConfiguration } from './configuration'
5+ import { PartialModuleConfiguration } from './configuration'
66
7- export type ModulePublicRuntimeConfig = Pick < DeepPartialModuleConfiguration , 'config' | 'clientConfig' | 'serverConfig' >
7+ export type ModulePublicRuntimeConfig = Pick < PartialModuleConfiguration , 'config' | 'clientConfig' | 'serverConfig' >
88
99// add type to Vue context
1010declare module 'vue/types/vue' {
@@ -24,7 +24,7 @@ declare module '@nuxt/types' {
2424 }
2525
2626 interface NuxtOptions {
27- sentry ?: DeepPartialModuleConfiguration
27+ sentry ?: PartialModuleConfiguration
2828 }
2929
3030 interface NuxtAppOptions {
Original file line number Diff line number Diff line change 1- import { DeepPartialModuleConfiguration , ModuleConfiguration } from './configuration'
1+ import { PartialModuleConfiguration , ModuleConfiguration } from './configuration'
22import { ModulePublicRuntimeConfig } from './extend'
33
4- type ModuleOptions = DeepPartialModuleConfiguration
4+ type ModuleOptions = PartialModuleConfiguration
55
66export { ModuleOptions , ModulePublicRuntimeConfig , ModuleConfiguration }
You can’t perform that action at this time.
0 commit comments