mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-24 07:17:55 +01:00
perf: ⚡ Spostate dichiarazioni delle variabili globali in un file dedicato
This commit is contained in:
parent
4cf2f201ea
commit
c91d09a787
@ -1,6 +1,3 @@
|
||||
/* eslint-disable no-var,vars-on-top */
|
||||
// noinspection ES6ConvertVarToLetConst
|
||||
|
||||
import '../scss/app.scss';
|
||||
import '@mdi/font/scss/materialdesignicons.scss';
|
||||
|
||||
@ -11,7 +8,6 @@ import Mithril from 'mithril';
|
||||
// noinspection SpellCheckingInspection
|
||||
import redaxios from 'redaxios';
|
||||
import {registerSW} from 'virtual:pwa-register';
|
||||
import type router from 'ziggy-js';
|
||||
|
||||
import {type Page} from './Components';
|
||||
import {
|
||||
@ -20,16 +16,6 @@ import {
|
||||
} from './utils';
|
||||
|
||||
// Variabili globali
|
||||
declare global {
|
||||
const importPath: string;
|
||||
const translations: {[key: string]: string};
|
||||
const route: typeof router;
|
||||
|
||||
var $: typeof cash;
|
||||
var m: typeof Mithril;
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
var __: typeof translator;
|
||||
}
|
||||
globalThis.$ = cash;
|
||||
globalThis.m = Mithril;
|
||||
globalThis.__ = translator;
|
||||
|
19
resources/js/globals.d.ts
vendored
Normal file
19
resources/js/globals.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/* eslint-disable no-var,vars-on-top */
|
||||
// noinspection ES6ConvertVarToLetConst
|
||||
|
||||
import type cash from 'cash-dom';
|
||||
import type Mithril from 'mithril';
|
||||
import type router from 'ziggy-js';
|
||||
|
||||
import type {__ as translator} from './utils';
|
||||
|
||||
declare global {
|
||||
const importPath: string;
|
||||
const translations: {[key: string]: string};
|
||||
const route: typeof router;
|
||||
|
||||
var $: typeof cash;
|
||||
var m: typeof Mithril;
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
var __: typeof translator;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user