initial commit
This commit is contained in:
5
resources/js/types/globals.d.ts
vendored
Normal file
5
resources/js/types/globals.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { route as routeFn } from 'ziggy-js';
|
||||
|
||||
declare global {
|
||||
const route: typeof routeFn;
|
||||
}
|
||||
39
resources/js/types/index.d.ts
vendored
Normal file
39
resources/js/types/index.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { PageProps } from '@inertiajs/core';
|
||||
import type { LucideIcon } from 'lucide-vue-next';
|
||||
import type { Config } from 'ziggy-js';
|
||||
|
||||
export interface Auth {
|
||||
user: User;
|
||||
}
|
||||
|
||||
export interface BreadcrumbItem {
|
||||
title: string;
|
||||
href: string;
|
||||
}
|
||||
|
||||
export interface NavItem {
|
||||
title: string;
|
||||
href: string;
|
||||
icon?: LucideIcon;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface SharedData extends PageProps {
|
||||
name: string;
|
||||
quote: { message: string; author: string };
|
||||
auth: Auth;
|
||||
ziggy: Config & { location: string };
|
||||
sidebarOpen: boolean;
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
avatar?: string;
|
||||
email_verified_at: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export type BreadcrumbItemType = BreadcrumbItem;
|
||||
12
resources/js/types/ziggy.d.ts
vendored
Normal file
12
resources/js/types/ziggy.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { RouteParams, Router } from 'ziggy-js';
|
||||
|
||||
declare global {
|
||||
function route(): Router;
|
||||
function route(name: string, params?: RouteParams<typeof name> | undefined, absolute?: boolean): string;
|
||||
}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
interface ComponentCustomProperties {
|
||||
route: typeof route;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user