soiz1's picture
Upload folder using huggingface_hub
4d70170 verified
raw
history blame
812 Bytes
import type { ApiProxy } from './proxy.js'
import type { PluginDescriptor, SetupFunction } from './index.js'
export interface PluginQueueItem {
pluginDescriptor: PluginDescriptor
setupFn: SetupFunction
proxy?: ApiProxy
}
interface GlobalTarget {
__VUE_DEVTOOLS_PLUGINS__?: PluginQueueItem[]
__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__?: boolean
}
export function getDevtoolsGlobalHook(): any {
return (getTarget() as any).__VUE_DEVTOOLS_GLOBAL_HOOK__
}
export function getTarget(): GlobalTarget {
// @ts-expect-error navigator and windows are not available in all environments
return (typeof navigator !== 'undefined' && typeof window !== 'undefined')
? window
: typeof globalThis !== 'undefined'
? globalThis
: {}
}
export const isProxyAvailable = typeof Proxy === 'function'