Skip to content

Commit dfc7ad8

Browse files
committed
Nuxt Module - Fix type imported from pkg
1 parent 4d19570 commit dfc7ad8

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
import * as _nuxt_schema from '@nuxt/schema'
22

3-
import { GlobalLoaderOptions } from 'vue-global-loader'
4-
5-
// Must use a Type and not an Interface
6-
type ModuleOptions = GlobalLoaderOptions & {
3+
// Somehow types if imported from the package are not recognized so they must be hardcoded. TODO: investigate
4+
interface ModuleOptions {
75
/**
86
* Whether to create and inject the global loader store in the Vue app. Equivalent of calling
97
* `app.use(globalLoader)` in the main.js of a non-Nuxt app.
108
*/
11-
addPlugin?: boolean
9+
addPlugin: boolean
10+
screenReaderMessage: string
11+
transitionDuration: number
12+
foregroundColor: string
13+
backgroundColor: string
14+
backgroundOpacity: number
15+
backgroundBlur: number
16+
zIndex: number
1217
}
1318

1419
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>
1520

16-
export { type ModuleOptions, _default as default }
21+
export { ModuleOptions, _default as default }

playground/nuxt.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ export default defineNuxtConfig({
2727
},
2828
},
2929
globalLoader: {
30-
addPlugin: true,
31-
// backgroundOpacity: 0.5,
32-
transitionDuration: 400,
30+
// addPlugin: true,
31+
transitionDuration: 300,
3332
backgroundColor: 'var(--light-1)',
3433
foregroundColor: 'var(--dark-1)',
3534
},

0 commit comments

Comments
 (0)