dockerfile/examples/omnivore/official-src/omnivore-main/packages/web/additional.d.ts

53 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2024-03-15 14:52:38 +08:00
export {}
declare type AndroidWebKitMessenger = {
// 1st argument is an actionID value, 2nd is jsonString
handleIdentifiableMessage: (string, string) => void
}
declare global {
interface Window {
webkit?: Webkit
MathJax?: MathJax
ANALYTICS_INITIALIZED: boolean
// eslint-disable-next-line @typescript-eslint/ban-types
Intercom: Function
intercomSettings: IntercomSettings
AndroidWebKitMessenger?: AndroidWebKitMessenger
themeKey?: string
twttr?: EmbedTweetWidget
}
}
declare type MathJax = {
typeset?: () => void
}
declare type Webkit = {
messageHandlers: MessageHandlers
}
declare type MessageHandlers = {
viewerAction?: WebKitMessageHandler
highlightAction?: WebKitMessageHandler
readingProgressUpdate?: WebKitMessageHandler
}
declare type WebKitMessageHandler = {
postMessage: (unknown) => void
}
interface IntercomSettings {
app_id: string
hide_default_launcher: boolean
vertical_padding: number
custom_launcher_selector: string
}
export interface EmbedTweetWidget {
widgets: {
createTweet: (string, HTMLElement, unknown) => void
}
[key: string]: string | { createTweet: unknown }
}