1
1
/**
2
+ * @typedef {import('vuex').Store } VueStore
3
+ * @typedef {import('vue').App } VueApp
2
4
* @typedef {import('vue').Component } VueComponent
3
5
* @typedef {import('vue').DefineComponent } DefineComponent
4
6
* @typedef {import('axios').AxiosInstance } AxiosInstance
5
7
* @typedef {Object<string, any> } AppConfig
6
8
* @typedef {import('./util/FormValidation').Form } Form
9
+ * @typedef {(app: VueApp, store: VueStore<any>) => void } BootingCallback
7
10
*/
8
11
export default class Nova {
9
12
/**
@@ -12,9 +15,9 @@ export default class Nova {
12
15
constructor ( config : AppConfig ) ;
13
16
/**
14
17
* @protected
15
- * @type {Function [] }
18
+ * @type {BootingCallback [] }
16
19
*/
17
- protected bootingCallbacks : Function [ ] ;
20
+ protected bootingCallbacks : BootingCallback [ ] ;
18
21
/** @readonly */
19
22
readonly appConfig : {
20
23
[ x : string ] : any ;
@@ -44,23 +47,27 @@ export default class Nova {
44
47
* Register a callback to be called before Nova starts. This is used to bootstrap
45
48
* addons, tools, custom fields, or anything else Nova needs
46
49
*
47
- * @param {Function } callback
50
+ * @param {BootingCallback } callback
48
51
*/
49
- booting ( callback : Function ) : void ;
52
+ booting ( callback : BootingCallback ) : void ;
50
53
/**
51
54
* Execute all of the booting callbacks.
52
55
*/
53
56
boot ( ) : void ;
54
- store : import ( "vuex" ) . Store < any > ;
57
+ /** @type {VueStore<any> } */
58
+ store : VueStore < any > ;
55
59
/**
56
- * @param {Function } callback
60
+ * @param {BootingCallback } callback
57
61
*/
58
- booted ( callback : Function ) : void ;
62
+ booted ( callback : BootingCallback ) : void ;
59
63
countdown ( ) : Promise < void > ;
60
64
/** @protected */
61
65
protected mountTo : Element ;
62
- /** @protected */
63
- protected app : import ( "vue" ) . App < Element > ;
66
+ /**
67
+ * @protected
68
+ * @type VueApp
69
+ */
70
+ protected app : VueApp ;
64
71
/**
65
72
* Start the Nova app by calling each of the tool's callbacks and then creating
66
73
* the underlying Vue instance.
@@ -248,11 +255,14 @@ export default class Nova {
248
255
} | string , options ?: any ) : void ;
249
256
applyTheme ( ) : void ;
250
257
}
258
+ export type VueStore = import ( "vuex" ) . Store < any > ;
259
+ export type VueApp = import ( "vue" ) . App ;
251
260
export type VueComponent = import ( "vue" ) . Component ;
252
261
export type DefineComponent = import ( "vue" ) . DefineComponent ;
253
262
export type AxiosInstance = import ( "axios" ) . AxiosInstance ;
254
263
export type AppConfig = {
255
264
[ x : string ] : any ;
256
265
} ;
257
266
export type Form = import ( "./util/FormValidation" ) . Form ;
267
+ export type BootingCallback = ( app : VueApp , store : VueStore < any > ) => void ;
258
268
//# sourceMappingURL=nova.d.ts.map
0 commit comments