1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-09-20 03:10:11 +00:00
jfa-go/ts/typings/d.ts

76 lines
1.6 KiB
TypeScript
Raw Normal View History

2020-12-28 18:15:52 +00:00
declare interface Modal {
modal: HTMLElement;
closeButton: HTMLSpanElement
show: () => void;
close: (event?: Event) => void;
toggle: () => void;
}
interface ArrayConstructor {
from(arrayLike: any, mapFn?, thisArg?): Array<any>;
}
declare interface Window {
URLBase: string;
modals: Modals;
cssFile: string;
availableProfiles: Array<any>;
jfUsers: Array<Object>;
notifications_enabled: boolean;
token: string;
buttonWidth: number;
transitionEvent: string;
animationEvent: string;
tabs: Tabs;
invites: inviteList;
2020-12-28 18:15:52 +00:00
}
declare interface Tabs {
tabs: Array<Tab>;
addTab: (tabID: string, preFunc?: () => void, postFunc?: () => void) => void;
switch: (tabID: string) => void;
}
declare interface Tab {
tabID: string;
tabEl: HTMLDivElement;
buttonEl: HTMLSpanElement;
preFunc?: () => void;
postFunc?: () => void;
}
2020-12-28 18:15:52 +00:00
declare interface Modals {
about: Modal;
login: Modal;
addUser: Modal;
modifyUser: Modal;
deleteUser: Modal;
settingsRestart: Modal;
settingsRefresh: Modal;
ombiDefaults?: Modal;
newAccountSuccess?: Modal;
}
interface Invite {
code?: string;
expiresIn?: string;
remainingUses?: string;
email?: string;
usedBy?: string[][];
2020-12-28 18:15:52 +00:00
created?: string;
notifyExpiry?: boolean;
notifyCreation?: boolean;
profile?: string;
}
interface inviteList {
empty: boolean;
invites: { [code: string]: Invite }
add: (invite: Invite) => void;
reload: () => void;
}
2020-12-28 18:15:52 +00:00
declare var config: Object;
declare var modifiedConfig: Object;