This commit is contained in:
+6
-15
@@ -1,13 +1,10 @@
|
||||
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 {
|
||||
@@ -41,7 +38,6 @@ interface Window {
|
||||
FolderOpenIcon?: string,
|
||||
repoLink?: string,
|
||||
repoActivityTopAuthors?: any[],
|
||||
pullRequestMergeForm?: Record<string, any>,
|
||||
dashboardRepoList?: Record<string, any>,
|
||||
},
|
||||
notificationSettings: {
|
||||
@@ -53,10 +49,10 @@ interface Window {
|
||||
enableTimeTracking: boolean,
|
||||
mermaidMaxSourceCharacters: number,
|
||||
i18n: Record<string, string>,
|
||||
frontendInited: boolean,
|
||||
},
|
||||
$: JQueryStatic,
|
||||
jQuery: JQueryStatic,
|
||||
htmx: typeof import('htmx.org').default,
|
||||
_globalHandlerErrors: Array<ErrorEvent & PromiseRejectionEvent> & {
|
||||
_inited: boolean,
|
||||
push: (e: ErrorEvent & PromiseRejectionEvent) => void | number,
|
||||
@@ -68,19 +64,14 @@ interface Window {
|
||||
turnstile: any,
|
||||
hcaptcha: any,
|
||||
|
||||
// Make IIFE private functions can be tested in unit tests, without exposing the IIFE module to global scope.
|
||||
// Make IIFE private functions can be managed by us in our scope, 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,
|
||||
}
|
||||
giteaExternalRenderHelper?: {
|
||||
isValidCssColor(s: string | null): boolean,
|
||||
queryParams: URLSearchParams,
|
||||
postIframeMsg(cmd: string, data: Record<string, any> = {}),
|
||||
}
|
||||
|
||||
// do not add more properties here unless it is a must
|
||||
}
|
||||
|
||||
declare module '*?worker' {
|
||||
const workerConstructor: new () => Worker;
|
||||
export default workerConstructor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user