Files

87 lines
2.4 KiB
TypeScript
Raw Permalink Normal View History

2024-08-28 18:32:38 +02:00
interface JQuery {
areYouSure: any, // jquery.are-you-sure
2025-01-02 01:21:13 +08:00
fomanticExt: any; // fomantic extension
api: any, // fomantic
2024-08-28 18:32:38 +02:00
dimmer: any, // fomantic
dropdown: any; // fomantic
modal: any; // fomantic
tab: any; // fomantic
transition: any, // fomantic
2024-12-11 09:29:04 +01:00
search: any, // fomantic
2024-08-28 18:32:38 +02:00
}
interface JQueryStatic {
api: any, // fomantic
}
interface Element {
_tippy: import('tippy.js').Instance;
}
2024-07-11 12:20:51 +02:00
interface Window {
2026-01-24 13:52:13 +01:00
config: {
appUrl: string,
appSubUrl: string,
assetUrlPrefix: string,
2026-03-29 12:24:30 +02:00
sharedWorkerUri: string,
2026-01-24 13:52:13 +01:00
runModeIsProd: boolean,
customEmojis: Record<string, string>,
2026-03-23 08:49:25 +01:00
pageData: Record<string, any> & {
adminUserListSearchForm?: {
SortType: string,
StatusFilterMap: Record<string, string>,
},
citationFileContent?: string,
prReview?: {
numberOfFiles: number,
numberOfViewedFiles: number,
},
DiffFileTree?: import('./modules/diff-file.ts').DiffFileTreeData,
FolderIcon?: string,
FolderOpenIcon?: string,
repoLink?: string,
repoActivityTopAuthors?: any[],
pullRequestMergeForm?: Record<string, any>,
dashboardRepoList?: Record<string, any>,
},
notificationSettings: {
MinTimeout: number,
TimeoutStep: number,
MaxTimeout: number,
EventSourceUpdateTime: number,
},
2026-01-24 13:52:13 +01:00
enableTimeTracking: boolean,
mermaidMaxSourceCharacters: number,
i18n: Record<string, string>,
},
2026-03-08 07:29:27 +01:00
$: JQueryStatic,
jQuery: JQueryStatic,
2025-07-06 12:55:16 +08:00
htmx: typeof import('htmx.org').default,
_globalHandlerErrors: Array<ErrorEvent & PromiseRejectionEvent> & {
_inited: boolean,
push: (e: ErrorEvent & PromiseRejectionEvent) => void | number,
},
localUserSettings: typeof import('./modules/user-settings.ts').localUserSettings,
2025-03-06 00:03:44 +08:00
// various captcha plugins
2024-11-21 14:57:42 +01:00
grecaptcha: any,
turnstile: any,
hcaptcha: any,
2025-03-06 00:03:44 +08:00
// Make IIFE private functions can be tested in unit tests, without exposing the IIFE module to global scope.
// Otherwise, when using "export" in IIFE code, the compiled JS will inject global "var externalRenderHelper = ..."
// which is not expected and may cause conflicts with other modules.
testModules: {
externalRenderHelper?: {
isValidCssColor(s: string | null): boolean,
}
}
2025-03-06 00:03:44 +08:00
// do not add more properties here unless it is a must
}
2026-03-29 12:24:30 +02:00
declare module '*?worker' {
const workerConstructor: new () => Worker;
export default workerConstructor;
}