Skip to content

Commit 81f71b1

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 42fe6d7 commit 81f71b1

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

types/dist/components.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
* @typedef {import('vue').App} VueApp
2+
* @typedef {import('./nova').default} NovaApp
33
*/
44
/**
5-
* @param {VueApp} app
5+
* @param {NovaApp} app
66
*/
7-
export function registerViews(app: VueApp): void;
8-
export type VueApp = import("vue").App;
7+
export function registerViews(app: NovaApp): void;
8+
export type NovaApp = import("./nova").default;
99
//# sourceMappingURL=components.d.ts.map

types/dist/components.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

types/dist/nova.d.ts

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
/**
2+
* @typedef {import('vuex').Store} VueStore
3+
* @typedef {import('vue').App} VueApp
24
* @typedef {import('vue').Component} VueComponent
35
* @typedef {import('vue').DefineComponent} DefineComponent
46
* @typedef {import('axios').AxiosInstance} AxiosInstance
57
* @typedef {Object<string, any>} AppConfig
68
* @typedef {import('./util/FormValidation').Form} Form
9+
* @typedef {(app: VueApp, store: VueStore<any>) => void} BootingCallback
710
*/
811
export default class Nova {
912
/**
@@ -12,9 +15,9 @@ export default class Nova {
1215
constructor(config: AppConfig);
1316
/**
1417
* @protected
15-
* @type {Function[]}
18+
* @type {BootingCallback[]}
1619
*/
17-
protected bootingCallbacks: Function[];
20+
protected bootingCallbacks: BootingCallback[];
1821
/** @readonly */
1922
readonly appConfig: {
2023
[x: string]: any;
@@ -44,23 +47,27 @@ export default class Nova {
4447
* Register a callback to be called before Nova starts. This is used to bootstrap
4548
* addons, tools, custom fields, or anything else Nova needs
4649
*
47-
* @param {Function} callback
50+
* @param {BootingCallback} callback
4851
*/
49-
booting(callback: Function): void;
52+
booting(callback: BootingCallback): void;
5053
/**
5154
* Execute all of the booting callbacks.
5255
*/
5356
boot(): void;
54-
store: import("vuex").Store<any>;
57+
/** @type {VueStore<any>} */
58+
store: VueStore<any>;
5559
/**
56-
* @param {Function} callback
60+
* @param {BootingCallback} callback
5761
*/
58-
booted(callback: Function): void;
62+
booted(callback: BootingCallback): void;
5963
countdown(): Promise<void>;
6064
/** @protected */
6165
protected mountTo: Element;
62-
/** @protected */
63-
protected app: import("vue").App<Element>;
66+
/**
67+
* @protected
68+
* @type VueApp
69+
*/
70+
protected app: VueApp;
6471
/**
6572
* Start the Nova app by calling each of the tool's callbacks and then creating
6673
* the underlying Vue instance.
@@ -248,11 +255,14 @@ export default class Nova {
248255
} | string, options?: any): void;
249256
applyTheme(): void;
250257
}
258+
export type VueStore = import("vuex").Store<any>;
259+
export type VueApp = import("vue").App;
251260
export type VueComponent = import("vue").Component;
252261
export type DefineComponent = import("vue").DefineComponent;
253262
export type AxiosInstance = import("axios").AxiosInstance;
254263
export type AppConfig = {
255264
[x: string]: any;
256265
};
257266
export type Form = import("./util/FormValidation").Form;
267+
export type BootingCallback = (app: VueApp, store: VueStore<any>) => void;
258268
//# sourceMappingURL=nova.d.ts.map

types/dist/nova.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)