mirror of
https://github.com/go-gitea/gitea
synced 2025-09-10 10:48:28 +00:00
Add types for js globals (#31586)
Adds types for `window.config` and jQuery/htmx globals, eliminating 48 `tsc` errors.
This commit is contained in:
14
types.d.ts
vendored
14
types.d.ts
vendored
@@ -2,3 +2,17 @@ declare module '*.svg' {
|
||||
const value: string;
|
||||
export default value;
|
||||
}
|
||||
|
||||
declare let __webpack_public_path__: string;
|
||||
|
||||
interface Window {
|
||||
config: import('./web_src/js/types.ts').Config;
|
||||
$: typeof import('@types/jquery'),
|
||||
jQuery: typeof import('@types/jquery'),
|
||||
htmx: typeof import('htmx.org'),
|
||||
}
|
||||
|
||||
declare module 'htmx.org/dist/htmx.esm.js' {
|
||||
const value = await import('htmx.org');
|
||||
export default value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user