Skip to content

Commit 15ebf52

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 69bda95 commit 15ebf52

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

types/menu.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type Badge = {
66
export type Menu = {
77
key: string;
88
name: string;
9-
component: "menu-section" | "menu-group" | "menu-item";
9+
component: 'menu-section' | 'menu-group' | 'menu-item';
1010
items: (Menu | MenuItem)[];
1111
collapsable: boolean;
1212
icon: string;

types/nova.d.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type {
22
App as VueApp,
3-
Component as VueComponent
3+
Component as VueComponent,
4+
DefineComponent
45
} from 'vue'
56
import type { Router } from '@inertiajs/core'
67
import type { AxiosInstance } from 'axios'
@@ -11,15 +12,15 @@ import type { Menu } from './menu'
1112
type State = {
1213
baseUri: string;
1314
currentUser: string | number | null;
14-
mainMenu: any[];
15-
userMenu: any[];
15+
mainMenu: Menu[];
16+
userMenu: Menu[];
1617
resources: Resource[];
1718
version: string;
1819
mainMenuShown: boolean;
1920
canLeaveForm: boolean;
2021
canLeaveModal: boolean;
2122
pushStateWasTriggered: boolean;
22-
validLicense: true;
23+
validLicense: boolean;
2324
queryStringParams: {[key: string]: any};
2425
compiledQueryStringParams: string;
2526
}
@@ -86,7 +87,7 @@ type Translations = {
8687
}
8788

8889
export declare type NovaApp = {
89-
pages: {[key: string]: VueComponent | string};
90+
pages: {[key: string]: VueComponent | DefineComponent};
9091
$router: Router;
9192
readonly appConfig: AppConfig;
9293
store: Store<State>;
@@ -105,10 +106,10 @@ export declare type NovaApp = {
105106

106107
request: (options: Object) => AxiosInstance;
107108

108-
inertia: (name: string, component: VueComponent | string) => void;
109+
inertia: (name: string, component: VueComponent | DefineComponent) => void;
109110
visit: (path: ({ url: string; remote: boolean; } | string), options?: Object) => void;
110111

111-
component: (name: string, component: VueComponent | string) => void;
112+
component: (name: string, component: VueComponent | DefineComponent) => void;
112113
hasComponent: (name: string) => boolean;
113114

114115
debug: (message: any, type?: string) => void;
@@ -129,6 +130,7 @@ export declare type NovaApp = {
129130

130131
declare global {
131132
interface Window {
133+
createNovaApp: (config: AppConfig) => NovaApp;
132134
Nova: NovaApp;
133135
}
134136
}

0 commit comments

Comments
 (0)