2022-02-11 17:24:33 +00:00
|
|
|
export {}
|
|
|
|
|
|
2022-09-26 19:49:10 +00:00
|
|
|
declare type AndroidWebKitMessenger = {
|
|
|
|
|
// 1st argument is an actionID value, 2nd is jsonString
|
|
|
|
|
handleIdentifiableMessage: (string, string) => void
|
2022-09-23 05:02:47 +00:00
|
|
|
}
|
|
|
|
|
|
2022-02-11 17:24:33 +00:00
|
|
|
declare global {
|
|
|
|
|
interface Window {
|
|
|
|
|
webkit?: Webkit
|
|
|
|
|
MathJax?: MathJax
|
|
|
|
|
ANALYTICS_INITIALIZED: boolean
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
|
|
|
Intercom: Function
|
|
|
|
|
intercomSettings: IntercomSettings
|
|
|
|
|
analytics?: Analytics
|
2022-09-26 19:49:10 +00:00
|
|
|
AndroidWebKitMessenger?: AndroidWebKitMessenger
|
2022-12-31 23:31:38 +00:00
|
|
|
themeKey?: string
|
2023-06-12 10:02:29 +00:00
|
|
|
twttr?: EmbedTweetWidget
|
2022-02-11 17:24:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare type MathJax = {
|
|
|
|
|
typeset?: () => void
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare type Webkit = {
|
|
|
|
|
messageHandlers: MessageHandlers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare type MessageHandlers = {
|
|
|
|
|
viewerAction?: WebKitMessageHandler
|
|
|
|
|
highlightAction?: WebKitMessageHandler
|
2022-03-08 21:54:20 +00:00
|
|
|
readingProgressUpdate?: WebKitMessageHandler
|
2022-02-11 17:24:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare type WebKitMessageHandler = {
|
|
|
|
|
postMessage: (unknown) => void
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface IntercomSettings {
|
|
|
|
|
app_id: string
|
|
|
|
|
hide_default_launcher: boolean
|
|
|
|
|
vertical_padding: number
|
|
|
|
|
custom_launcher_selector: string
|
|
|
|
|
}
|
2023-06-12 10:02:29 +00:00
|
|
|
|
|
|
|
|
export interface EmbedTweetWidget {
|
|
|
|
|
widgets: {
|
|
|
|
|
createTweet: (string, HTMLElement, unknown) => void
|
|
|
|
|
}
|
|
|
|
|
[key: string]: string | { createTweet: unknown }
|
|
|
|
|
}
|