gitea/web_src/js/types.ts
silverwind 228c354b16
Add types for js globals (#31586)
Adds types for `window.config` and jQuery/htmx globals, eliminating 48
`tsc` errors.
2024-07-11 10:20:51 +00:00

24 lines
539 B
TypeScript

export type MentionValue = {
key: string,
value: string,
name: string,
fullname: string,
avatar: string,
}
export type Config = {
appUrl: string,
appSubUrl: string,
assetVersionEncoded: string,
assetUrlPrefix: string,
runModeIsProd: boolean,
customEmojis: Record<string, string>,
csrfToken: string,
pageData: Record<string, any>,
notificationSettings: Record<string, any>,
enableTimeTracking: boolean,
mentionValues?: MentionValue[],
mermaidMaxSourceCharacters: number,
i18n: Record<string, string>,
}