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:
Milan Burda 2021-05-06 03:05:01 +02:00 committed by GitHub
parent 8d0e7aed9f
commit 2c65060ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 68 additions and 58 deletions

View file

@ -1,10 +1,13 @@
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
import type * as ipcRendererUtilsModule from '@electron/internal/renderer/ipc-renderer-internal-utils';
import type * as typeUtilsModule from '@electron/internal/common/type-utils';
const clipboard = process._linkedBinding('electron_common_clipboard');
if (process.type === 'renderer') {
const ipcRendererUtils = require('@electron/internal/renderer/ipc-renderer-internal-utils');
const typeUtils = require('@electron/internal/common/type-utils');
const ipcRendererUtils = require('@electron/internal/renderer/ipc-renderer-internal-utils') as typeof ipcRendererUtilsModule;
const typeUtils = require('@electron/internal/common/type-utils') as typeof typeUtilsModule;
const makeRemoteMethod = function (method: keyof Electron.Clipboard) {
return (...args: any[]) => {