mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-30 11:19:39 +01:00
Fixes: https://github.com/go-gitea/gitea/issues/36175 1. Correctly apply setting on textareas spawned by comment edit 3. When changing the setting, apply it to all textareas on the current page --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
89 lines
2.3 KiB
TypeScript
89 lines
2.3 KiB
TypeScript
declare module '*.svg' {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
|
|
declare module '*.css' {
|
|
const value: string;
|
|
export default value;
|
|
}
|
|
|
|
declare module '*.vue' {
|
|
import type {DefineComponent} from 'vue';
|
|
const component: DefineComponent<unknown, unknown, any>;
|
|
export default component;
|
|
// Here we declare all exports from vue files so `tsc` or `tsgo` can work for
|
|
// non-vue files. To lint .vue files, `vue-tsc` must be used.
|
|
export function initDashboardRepoList(): void;
|
|
export function initRepositoryActionView(): void;
|
|
}
|
|
|
|
declare module 'htmx.org/dist/htmx.esm.js' {
|
|
const value = await import('htmx.org');
|
|
export default value;
|
|
}
|
|
|
|
declare module 'swagger-ui-dist/swagger-ui-es-bundle.js' {
|
|
const value = await import('swagger-ui-dist');
|
|
export default value.SwaggerUIBundle;
|
|
}
|
|
|
|
interface JQuery {
|
|
areYouSure: any, // jquery.are-you-sure
|
|
fomanticExt: any; // fomantic extension
|
|
api: any, // fomantic
|
|
dimmer: any, // fomantic
|
|
dropdown: any; // fomantic
|
|
modal: any; // fomantic
|
|
tab: any; // fomantic
|
|
transition: any, // fomantic
|
|
search: any, // fomantic
|
|
}
|
|
|
|
interface JQueryStatic {
|
|
api: any, // fomantic
|
|
}
|
|
|
|
interface Element {
|
|
_tippy: import('tippy.js').Instance;
|
|
}
|
|
|
|
interface Window {
|
|
config: {
|
|
appUrl: string,
|
|
appSubUrl: string,
|
|
assetVersionEncoded: string,
|
|
assetUrlPrefix: string,
|
|
runModeIsProd: boolean,
|
|
customEmojis: Record<string, string>,
|
|
pageData: Record<string, any>,
|
|
notificationSettings: Record<string, any>,
|
|
enableTimeTracking: boolean,
|
|
mentionValues: Array<{
|
|
key: string,
|
|
value: string,
|
|
name: string,
|
|
fullname: string,
|
|
avatar: string,
|
|
}>,
|
|
mermaidMaxSourceCharacters: number,
|
|
i18n: Record<string, string>,
|
|
},
|
|
$: typeof import('@types/jquery'),
|
|
jQuery: typeof import('@types/jquery'),
|
|
htmx: typeof import('htmx.org').default,
|
|
_globalHandlerErrors: Array<ErrorEvent & PromiseRejectionEvent> & {
|
|
_inited: boolean,
|
|
push: (e: ErrorEvent & PromiseRejectionEvent) => void | number,
|
|
},
|
|
codeEditors: any[], // export editor for customization
|
|
localUserSettings: typeof import('./modules/user-settings.ts').localUserSettings,
|
|
|
|
// various captcha plugins
|
|
grecaptcha: any,
|
|
turnstile: any,
|
|
hcaptcha: any,
|
|
|
|
// do not add more properties here unless it is a must
|
|
}
|