1
1
import type {
2
2
App as VueApp ,
3
- Component as VueComponent
3
+ Component as VueComponent ,
4
+ DefineComponent
4
5
} from 'vue'
5
6
import type { Router } from '@inertiajs/core'
6
7
import type { AxiosInstance } from 'axios'
@@ -11,15 +12,15 @@ import type { Menu } from './menu'
11
12
type State = {
12
13
baseUri : string ;
13
14
currentUser : string | number | null ;
14
- mainMenu : any [ ] ;
15
- userMenu : any [ ] ;
15
+ mainMenu : Menu [ ] ;
16
+ userMenu : Menu [ ] ;
16
17
resources : Resource [ ] ;
17
18
version : string ;
18
19
mainMenuShown : boolean ;
19
20
canLeaveForm : boolean ;
20
21
canLeaveModal : boolean ;
21
22
pushStateWasTriggered : boolean ;
22
- validLicense : true ;
23
+ validLicense : boolean ;
23
24
queryStringParams : { [ key : string ] : any } ;
24
25
compiledQueryStringParams : string ;
25
26
}
@@ -86,7 +87,7 @@ type Translations = {
86
87
}
87
88
88
89
export declare type NovaApp = {
89
- pages : { [ key : string ] : VueComponent | string } ;
90
+ pages : { [ key : string ] : VueComponent | DefineComponent } ;
90
91
$router : Router ;
91
92
readonly appConfig : AppConfig ;
92
93
store : Store < State > ;
@@ -105,10 +106,10 @@ export declare type NovaApp = {
105
106
106
107
request : ( options : Object ) => AxiosInstance ;
107
108
108
- inertia : ( name : string , component : VueComponent | string ) => void ;
109
+ inertia : ( name : string , component : VueComponent | DefineComponent ) => void ;
109
110
visit : ( path : ( { url : string ; remote : boolean ; } | string ) , options ?: Object ) => void ;
110
111
111
- component : ( name : string , component : VueComponent | string ) => void ;
112
+ component : ( name : string , component : VueComponent | DefineComponent ) => void ;
112
113
hasComponent : ( name : string ) => boolean ;
113
114
114
115
debug : ( message : any , type ?: string ) => void ;
@@ -129,6 +130,7 @@ export declare type NovaApp = {
129
130
130
131
declare global {
131
132
interface Window {
133
+ createNovaApp : ( config : AppConfig ) => NovaApp ;
132
134
Nova : NovaApp ;
133
135
}
134
136
}
0 commit comments