1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-10-19 06:43:41 -04:00
gitea/web_src/js/types.ts
silverwind 930ca92d7c
Add types to fetch,toast,bootstrap,svg (#31627)
Reduce `tsc` error count by 53. None of the changes has any runtime
effect.
2024-07-25 23:31:24 +00:00

32 lines
723 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>,
}
export type Intent = 'error' | 'warning' | 'info';
export type RequestData = string | FormData | URLSearchParams;
export type RequestOpts = {
data?: RequestData,
} & RequestInit;