chore: make raw requires type-safe (#29006)
* chore: make raw requires type-safe * refactor: no need for separate webViewImplModule * refactor: no need for separate guestViewInternalModule
This commit is contained in:
parent
8d0e7aed9f
commit
2c65060ec8
13 changed files with 68 additions and 58 deletions
|
@ -9,9 +9,11 @@
|
|||
// modules must be passed from outside, all included files must be plain JS.
|
||||
|
||||
import { WEB_VIEW_CONSTANTS } from '@electron/internal/renderer/web-view/web-view-constants';
|
||||
import { WebViewImpl as IWebViewImpl, webViewImplModule } from '@electron/internal/renderer/web-view/web-view-impl';
|
||||
import type * as webViewImplModule from '@electron/internal/renderer/web-view/web-view-impl';
|
||||
import type { SrcAttribute } from '@electron/internal/renderer/web-view/web-view-attributes';
|
||||
|
||||
type IWebViewImpl = webViewImplModule.WebViewImpl;
|
||||
|
||||
// Return a WebViewElement class that is defined in this context.
|
||||
const defineWebViewElement = (v8Util: NodeJS.V8UtilBinding, webViewImpl: typeof webViewImplModule) => {
|
||||
const { guestViewInternal, WebViewImpl } = webViewImpl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue