diff --git a/lib/isolated_renderer/init.ts b/lib/isolated_renderer/init.ts index d2cbf4207fa..30b8eec2468 100644 --- a/lib/isolated_renderer/init.ts +++ b/lib/isolated_renderer/init.ts @@ -1,6 +1,7 @@ -/* global isolatedApi */ - import type * as webViewElementModule from '@electron/internal/renderer/web-view/web-view-element'; +import type { WebViewImplHooks } from '@electron/internal/renderer/web-view/web-view-impl'; + +declare const isolatedApi: WebViewImplHooks; if (isolatedApi.guestViewInternal) { // Must setup the WebView element in main world. diff --git a/lib/sandboxed_renderer/init.ts b/lib/sandboxed_renderer/init.ts index 079dd38b069..9c07a198240 100644 --- a/lib/sandboxed_renderer/init.ts +++ b/lib/sandboxed_renderer/init.ts @@ -1,10 +1,15 @@ -/* global binding */ import * as events from 'events'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; import type * as ipcRendererUtilsModule from '@electron/internal/renderer/ipc-renderer-internal-utils'; import type * as ipcRendererInternalModule from '@electron/internal/renderer/ipc-renderer-internal'; +declare const binding: { + get: (name: string) => any; + process: NodeJS.Process; + createPreloadScript: (src: string) => Function +}; + const { EventEmitter } = events; process._linkedBinding = binding.get; diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 805236ddd62..08764778047 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -1,13 +1,3 @@ -/* eslint-disable no-var */ -declare var internalBinding: any; -declare var binding: { get: (name: string) => any; process: NodeJS.Process; createPreloadScript: (src: string) => Function }; - -declare var isolatedApi: { - guestViewInternal: any; - allowGuestViewElementDefinition: NodeJS.InternalWebFrame['allowGuestViewElementDefinition']; - setIsWebView: (iframe: HTMLIFrameElement) => void; -} - declare const BUILDFLAG: (flag: boolean) => boolean; declare const ENABLE_DESKTOP_CAPTURER: boolean;