typescript/ts内使用window.webkit报错Property 'webkit' does not exist on type 'Window & typeof globalThis'
需要声明一下window
单文件:
declare var window: Window & { webkit: any };
全局使用:
declare global {
interface Window {
isWeixin: boolean
}
}
typescript/ts内使用window.webkit报错Property 'webkit' does not exist on type 'Window & typeof globalThis'
需要声明一下window
单文件:
declare var window: Window & { webkit: any };
全局使用:
declare global {
interface Window {
isWeixin: boolean
}
}