You've already forked Atomcms-edit
Migrate JavaScript to TypeScript with full type safety
- Rename all .js/.jsx files to .ts/.tsx across resources/js and theme dirs - Add TypeScript 6.0 with strict mode, tsconfig.json - Add type definitions for Inertia page props, Alpine.js, Turbolinks - Update vite.config.js entries to .ts/.tsx extensions - Update all Blade @vite() calls to match new .ts/.tsx entry points - Add TypeScript ESLint config (replacing unused Vue plugin) - Add @types/react, @types/react-dom, @types/lodash - Add typecheck script and integrate into check pipeline - Full tsc --noEmit, ESLint, and production build pass cleanly
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
declare module "alpinejs" {
|
||||
interface Alpine {
|
||||
data(name: string, callback: (...args: unknown[]) => Record<string, unknown>): void;
|
||||
plugin(plugin: unknown): void;
|
||||
start(): void;
|
||||
}
|
||||
const Alpine: Alpine;
|
||||
export default Alpine;
|
||||
}
|
||||
|
||||
declare module "@alpinejs/focus" {
|
||||
const focus: unknown;
|
||||
export default focus;
|
||||
}
|
||||
|
||||
declare module "turbolinks" {
|
||||
interface TurbolinksStatic {
|
||||
start(): void;
|
||||
}
|
||||
const Turbolinks: TurbolinksStatic;
|
||||
export default Turbolinks;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
_: import("lodash").default;
|
||||
axios: import("axios").AxiosStatic;
|
||||
App: {
|
||||
defaultReactions: string[];
|
||||
isAuthenticated: boolean;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user